Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/pytest_plugin.py
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
def swh_storage_backend_config(swh_storage_postgresql): | def swh_storage_backend_config(swh_storage_postgresql): | ||||
"""Basic pg storage configuration with no journal collaborator | """Basic pg storage configuration with no journal collaborator | ||||
(to avoid pulling optional dependency on clients of this fixture) | (to avoid pulling optional dependency on clients of this fixture) | ||||
""" | """ | ||||
yield { | yield { | ||||
"cls": "local", | "cls": "local", | ||||
"db": swh_storage_postgresql.dsn, | "db": swh_storage_postgresql.dsn, | ||||
"objstorage": {"cls": "memory", "args": {}}, | "objstorage": {"cls": "memory"}, | ||||
"check_config": {"check_write": True}, | "check_config": {"check_write": True}, | ||||
} | } | ||||
@pytest.fixture | @pytest.fixture | ||||
def swh_storage(swh_storage_backend_config): | def swh_storage(swh_storage_backend_config): | ||||
return get_storage(**swh_storage_backend_config) | return get_storage(**swh_storage_backend_config) | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |