swh.storage.pytest_plugin module#

swh.storage.pytest_plugin.cassandra_auth_provider_config()[source]#
swh.storage.pytest_plugin.swh_storage_cassandra_cluster(tmpdir_factory)[source]#
swh.storage.pytest_plugin.swh_storage_cassandra_keyspace(swh_storage_cassandra_cluster, cassandra_auth_provider_config)[source]#
swh.storage.pytest_plugin.swh_storage_cassandra_backend_config(swh_storage_cassandra_cluster, swh_storage_cassandra_keyspace, cassandra_auth_provider_config)[source]#
swh.storage.pytest_plugin.swh_storage_postgresql_backend_config(swh_storage_postgresql)[source]#

Basic pg storage configuration with no journal collaborator (to avoid pulling optional dependency on clients of this fixture)

swh.storage.pytest_plugin.swh_storage_backend_config(swh_storage_postgresql_backend_config)[source]#

Configuration to use for swh_storage_backend().

Defaults to swh_storage_postgresql_backend_config().

swh.storage.pytest_plugin.swh_storage_backend(swh_storage_backend_config)[source]#

By default, this fixture aliases swh_storage. However, when swh_storage is overridden to be a proxy storage, this fixture returns the storage instance behind all proxies.

This is useful to introspect the state of backends from proxy tests

swh.storage.pytest_plugin.swh_storage(swh_storage_backend)[source]#
swh.storage.pytest_plugin.sample_data() StorageData[source]#

Pre-defined sample storage object data to manipulate

Returns:

StorageData whose attribute keys are data model objects. Either multiple objects: contents, directories, revisions, releases, … or simple ones: content, directory, revision, release, …