tmpdir = local('/tmp/pytest-of-jenkins/pytest-0/test_opam_revision0')
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7ffaa6477d68>
swh_storage = <swh.storage.proxies.retry.RetryingProxyStorage object at 0x7ffaa64775c0>
datadir = '/var/lib/jenkins/workspace/DLDBASE/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/loader/package/opam/tests/data'
def test_opam_revision(tmpdir, requests_mock_datadir, swh_storage, datadir):
opam_url = f"file://{datadir}/fake_opam_repo"
opam_root = tmpdir
# the directory should NOT exist, we just need an unique name, so we delete it
rmtree(tmpdir)
opam_instance = "loadertest"
opam_package = "ocb"
url = f"opam+{opam_url}/packages/{opam_package}"
loader = OpamLoader(
swh_storage, url, opam_root, opam_instance, opam_url, opam_package
)
actual_load_status = loader.load()
expected_snapshot_id = hash_to_bytes("398df115b9feb2f463efd21941d69b7d59cd9025")
> assert actual_load_status == {
"status": "eventful",
"snapshot_id": expected_snapshot_id.hex(),
}
E AssertionError: assert {'snapshot_id... 'uneventful'} == {'snapshot_id...': 'eventful'}
E Differing items:
E {'status': 'uneventful'} != {'status': 'eventful'}
E {'snapshot_id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e'} != {'snapshot_id': '398df115b9feb2f463efd21941d69b7d59cd9025'}
E Full diff:
E {
E - 'snapshot_id': '398df115b9feb2f463efd21941d69b7d59cd9025',
E + 'snapshot_id': '1a8893e6a86f444e8be8e7bda6cb34fb1735a00e',...
E
E ...Full output truncated (5 lines hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/loader/package/opam/tests/test_opam.py:145: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Aug 12 2021, 12:13 PM