Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.loader.metadata.tests.test_base::test_load
Failed

TEST RESULT

Run At
May 9 2022, 6:42 PM
Details
swh_storage = <swh.storage.proxies.retry.RetryingProxyStorage object at 0x7fae73395b70> mocker = <pytest_mock.plugin.MockerFixture object at 0x7fae7342a630> def test_load(swh_storage, mocker): mocker.patch( "swh.loader.core.metadata_fetchers._fetchers", return_value=[DummyMetadataFetcher], ) loader = DummyLoader( storage=swh_storage, origin_url=ORIGIN.url, lister_name="fake-lister", lister_instance_name="", ) loader.load() > assert swh_storage.raw_extrinsic_metadata_get( ORIGIN.swhid(), METADATA_AUTHORITY ).results == [REMD] .tox/py3/lib/python3.7/site-packages/swh/loader/metadata/tests/test_base.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:324: in wrapped_f return self(f, *args, **kw) .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:404: in __call__ do = self.iter(retry_state=retry_state) .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:349: in iter return fut.result() /usr/lib/python3.7/concurrent/futures/_base.py:425: in result return self.__get_result() /usr/lib/python3.7/concurrent/futures/_base.py:384: in __get_result raise self._exception .tox/py3/lib/python3.7/site-packages/tenacity/__init__.py:407: in __call__ result = fn(*args, **kwargs) .tox/py3/lib/python3.7/site-packages/swh/storage/proxies/retry.py:62: in newf return getattr(storage, attribute_name)(*args, **kwargs) .tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:73: in _meth return meth(self, *args, db=db, cur=cur, **kwargs) .tox/py3/lib/python3.7/site-packages/swh/storage/postgresql/storage.py:1544: in raw_extrinsic_metadata_get authority_id = self._get_authority_id(authority, db, cur) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.postgresql.storage.Storage object at 0x7fae7342a6a0> authority = MetadataAuthority(type=MetadataAuthorityType.FORGE, url='http://example.org/', metadata=None) db = <swh.storage.postgresql.db.Db object at 0x7fae73277ac8> cur = <cursor object at 0x7fae73335428; closed: -1> def _get_authority_id(self, authority: MetadataAuthority, db, cur): authority_id = db.metadata_authority_get_id( authority.type.value, authority.url, cur ) if not authority_id: > raise StorageArgumentException(f"Unknown authority {authority}") E swh.storage.exc.StorageArgumentException: Unknown authority MetadataAuthority(type=MetadataAuthorityType.FORGE, url='http://example.org/', metadata=None) .tox/py3/lib/python3.7/site-packages/swh/storage/postgresql/storage.py:1672: StorageArgumentException