swh_storage = <swh.storage.filter.FilteringProxyStorage object at 0x7fdb8945fbe0>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fdb891c51d0>
datadir = '/var/lib/jenkins/workspace/DLDHG/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/tests/data'
def test_visit_with_archive_decompression_failure(swh_storage, mocker, datadir):
"""Failure to decompress should fail early, no data is ingested"""
mock_patoo = mocker.patch("swh.loader.mercurial.archive_extract.patoolib")
mock_patoo.side_effect = ValueError
archive_name = "hello"
archive_path = os.path.join(datadir, f"{archive_name}.tgz")
loader = HgArchiveBundle20Loader(
> swh_storage, url=archive_path, visit_date=VISIT_DATE,
)
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/tests/test_loader.py:190:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/loader.py:660: in __init__
max_content_size=max_content_size,
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/loader.py:142: in __init__
os.environ.update(get_minimum_env())
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/utils.py:36: in get_minimum_env
"PATH": os.environ["PATH"],
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({}), key = 'PATH'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'PATH'
/usr/lib/python3.7/os.py:678: KeyError
TEST RESULT
TEST RESULT
- Run At
- Feb 25 2021, 3:58 PM