Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/conftest.py
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | def idx_storage_backend_config(idx_storage_postgresql): | ||||||||||||
return { | return { | ||||||||||||
"cls": "local", | "cls": "local", | ||||||||||||
"db": idx_storage_postgresql.dsn, | "db": idx_storage_postgresql.dsn, | ||||||||||||
} | } | ||||||||||||
@pytest.fixture | @pytest.fixture | ||||||||||||
def swh_indexer_config( | def swh_indexer_config( | ||||||||||||
swh_storage_backend_config, idx_storage_backend_config, swh_scheduler_config | swh_storage_backend_config, | ||||||||||||
idx_storage_backend_config, | |||||||||||||
swh_scheduler_config, | |||||||||||||
tmp_path, | |||||||||||||
): | ): | ||||||||||||
from os import makedirs | |||||||||||||
objstore_rootdir = f"{tmp_path}/objstorage/objects" | |||||||||||||
vlorentzUnsubmitted Done Inline Actions
vlorentz: | |||||||||||||
Done Inline Actionsthx and lol, i can even do better and simply drop that now useless bit. ardumont: thx
and lol, i can even do better and simply drop that now useless bit.
It's a previous test… | |||||||||||||
makedirs(objstore_rootdir) | |||||||||||||
return { | return { | ||||||||||||
"storage": swh_storage_backend_config, | "storage": swh_storage_backend_config, | ||||||||||||
"objstorage": {"cls": "memory"}, | "objstorage": { | ||||||||||||
"cls": "pathslicing", | |||||||||||||
"root": objstore_rootdir, | |||||||||||||
"slicing": "0:2/0:5", | |||||||||||||
}, | |||||||||||||
"indexer_storage": idx_storage_backend_config, | "indexer_storage": idx_storage_backend_config, | ||||||||||||
"scheduler": {"cls": "local", **swh_scheduler_config}, | "scheduler": {"cls": "local", **swh_scheduler_config}, | ||||||||||||
"tools": { | "tools": { | ||||||||||||
"name": "file", | "name": "file", | ||||||||||||
"version": "1:5.30-1+deb9u1", | "version": "1:5.30-1+deb9u1", | ||||||||||||
"configuration": {"type": "library", "debian-package": "python3-magic"}, | "configuration": {"type": "library", "debian-package": "python3-magic"}, | ||||||||||||
}, | }, | ||||||||||||
"compute_checksums": ["blake2b512"], # for rehash indexer | "compute_checksums": ["blake2b512"], # for rehash indexer | ||||||||||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |