Skip to content
Snippets Groups Projects
Commit 26a19ee9 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

conftest: Migrate to new fixtures from swh-storage pytest plugin

Remove no longer needed swh_storage_backend_config override as storage
configuration is already defined in the swh-loader-core pytest plugin.

Use new swh_storage_config fixture in swh_loader fixture.
parent 0dd744df
No related branches found
No related tags found
No related merge requests found
Pipeline #12245 passed
swh.core >= 2.22.0
swh.loader.core >= 5.18.3
# swh.loader.core >= 5.18.3
swh-loader-core @ git+https://gitlab.softwareheritage.org/swh/devel/swh-loader-core.git@refs/merge-requests/537/head#egg=swh.loader.core
swh.model >= 6.13.0
swh.scheduler >= 0.0.39
swh.storage >= 2.4.1
# swh.storage >= 2.4.1
swh-storage @ git+https://gitlab.softwareheritage.org/swh/devel/swh-storage.git@refs/merge-requests/1154/head#egg=swh.storage
pytest >= 8.1
pytest-mock
requests_mock
swh.loader.core[testing] >= 5.18.1
# swh.loader.core[testing] >= 5.18.1
swh-loader-core[testing] @ git+https://gitlab.softwareheritage.org/swh/devel/swh-loader-core.git@refs/merge-requests/537/head#egg=swh.loader.core
swh.scheduler[testing] >= 0.5.0
swh.storage[testing] >= 2.4.1
# swh.storage[testing] >= 2.4.1
swh-storage[testing] @ git+https://gitlab.softwareheritage.org/swh/devel/swh-storage.git@refs/merge-requests/1154/head#egg=swh.storage
types-Deprecated
types-click
types-urllib3
# Copyright (C) 2018-2021 The Software Heritage developers
# Copyright (C) 2018-2024 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
......@@ -19,31 +19,9 @@ def git_lister():
@pytest.fixture
def swh_storage_backend_config(swh_storage_backend_config):
"""Basic pg storage configuration with no journal collaborator
(to avoid pulling optional dependency on clients of this fixture)
"""
return {
"cls": "filter",
"storage": {
"cls": "buffer",
"min_batch_size": {
"content": 10,
"content_bytes": 100 * 1024 * 1024,
"directory": 10,
"revision": 10,
"release": 10,
},
"storage": swh_storage_backend_config,
},
}
@pytest.fixture
def swh_loader_config(swh_storage_backend_config) -> Dict[str, Any]:
def swh_loader_config(swh_storage_config) -> Dict[str, Any]:
return {
"storage": swh_storage_backend_config,
"storage": swh_storage_config,
"max_content_size": 100 * 1024 * 1024,
"save_data_path": None,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment