Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/tests/conftest.py
Show All 10 Lines | |||||
from swh.scheduler.tests.conftest import swh_app # noqa | from swh.scheduler.tests.conftest import swh_app # noqa | ||||
@pytest.fixture | @pytest.fixture | ||||
def swh_loader_config() -> Dict[str, Any]: | def swh_loader_config() -> Dict[str, Any]: | ||||
return { | return { | ||||
'storage': { | 'storage': { | ||||
'cls': 'memory', | 'cls': 'pipeline', | ||||
'steps': [ | |||||
{ | |||||
'cls': 'filter' | |||||
}, | |||||
{ | |||||
'cls': 'buffer', | |||||
'min_batch_size': { | |||||
'content': 10000, | |||||
'content_bytes': 1073741824, | |||||
'directory': 2500, | |||||
'revision': 10, | |||||
'release': 100, | |||||
}, | |||||
}, | |||||
{ | |||||
'cls': 'memory' | |||||
}, | |||||
] | |||||
}, | }, | ||||
'check_revision': {'limit': 100, 'status': False}, | 'check_revision': {'limit': 100, 'status': False}, | ||||
'content_packet_block_size_bytes': 104857600, | |||||
'content_packet_size': 10000, | |||||
'content_packet_size_bytes': 1073741824, | |||||
'content_size_limit': 104857600, | |||||
'debug': False, | 'debug': False, | ||||
'directory_packet_size': 2500, | |||||
'log_db': 'dbname=softwareheritage-log', | 'log_db': 'dbname=softwareheritage-log', | ||||
'occurrence_packet_size': 1000, | |||||
'release_packet_size': 1000, | |||||
'revision_packet_size': 10, | |||||
'save_data': False, | 'save_data': False, | ||||
'save_data_path': '', | 'save_data_path': '', | ||||
'send_contents': True, | |||||
'send_directories': True, | |||||
'send_occurrences': True, | |||||
'send_releases': True, | |||||
'send_revisions': True, | |||||
'send_snapshot': True, | |||||
'temp_directory': '/tmp', | 'temp_directory': '/tmp', | ||||
} | } | ||||
@pytest.fixture | @pytest.fixture | ||||
def swh_config(swh_loader_config, monkeypatch, tmp_path): | def swh_config(swh_loader_config, monkeypatch, tmp_path): | ||||
conffile = os.path.join(str(tmp_path), 'loader.yml') | conffile = os.path.join(str(tmp_path), 'loader.yml') | ||||
with open(conffile, 'w') as f: | with open(conffile, 'w') as f: | ||||
Show All 10 Lines |