Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/mercurial/tests/common.py
# Copyright (C) 2018 The Software Heritage developers | # Copyright (C) 2018-2019 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from swh.loader.mercurial.loader import ( | from swh.loader.mercurial.loader import ( | ||||
HgBundle20Loader, HgArchiveBundle20Loader | HgBundle20Loader, HgArchiveBundle20Loader | ||||
) | ) | ||||
_LOADER_TEST_CONFIG = { | _LOADER_TEST_CONFIG = { | ||||
'bundle_filename': 'HG20_none_bundle', | 'bundle_filename': 'HG20_none_bundle', | ||||
'cache1_size': 838860800, | 'cache1_size': 838860800, | ||||
'cache2_size': 838860800, | 'cache2_size': 838860800, | ||||
'content_packet_size': 100000, | |||||
'content_packet_size_bytes': 1073741824, | |||||
'content_size_limit': 104857600, | 'content_size_limit': 104857600, | ||||
'directory_packet_size': 25000, | |||||
'clone_timeout_seconds': 2 * 3600, | 'clone_timeout_seconds': 2 * 3600, | ||||
'log_db': 'dbname=softwareheritage-log', | 'log_db': 'dbname=softwareheritage-log', | ||||
'occurrence_packet_size': 100000, | |||||
'reduce_effort': False, | 'reduce_effort': False, | ||||
'release_packet_size': 100000, | |||||
'revision_packet_size': 100000, | |||||
'save_data': False, | 'save_data': False, | ||||
'save_data_path': '', | 'save_data_path': '', | ||||
'send_contents': True, | 'max_content_size': 100 * 1024 * 1024, | ||||
'send_directories': True, | 'storage': { | ||||
'send_occurrences': True, | 'cls': 'pipeline', | ||||
'send_releases': True, | 'steps': [ | ||||
'send_revisions': True, | {'cls': 'filter'}, | ||||
'send_snapshot': True, | {'cls': 'memory'}, | ||||
'storage': {'args': {}, 'cls': 'memory'}, | ] | ||||
}, | |||||
'temp_directory': '/tmp/swh.loader.mercurial' | 'temp_directory': '/tmp/swh.loader.mercurial' | ||||
} | } | ||||
class BaseHgLoaderMemoryStorage: | class BaseHgLoaderMemoryStorage: | ||||
"""The base mercurial loader to test. | """The base mercurial loader to test. | ||||
Mixin behavior changed to: | Mixin behavior changed to: | ||||
Show All 23 Lines |