swh_indexer_config = {'compute_checksums': ['blake2b512'], 'indexer_storage': {'cls': 'local', 'db': "user=postgres password=xxx dbname=tes...cheduler': {'cls': 'local', 'db': "user=postgres password=xxx dbname=tests host=127.0.0.1 port=25112 options=''"}, ...}
idx_storage = <swh.indexer.storage.IndexerStorage object at 0x7fa3f80b1550>
storage = <swh.storage.postgresql.storage.Storage object at 0x7fa4000809b0>
obj_storage = <swh.objstorage.backends.in_memory.InMemoryObjStorage object at 0x7fa3f80b1080>
def test_origin_metadata_indexer_duplicate_origin(
swh_indexer_config,
idx_storage: IndexerStorageInterface,
storage: StorageInterface,
obj_storage,
) -> None:
indexer = OriginMetadataIndexer(config=swh_indexer_config)
indexer.storage = storage
indexer.idx_storage = idx_storage
indexer.run(["https://github.com/librariesio/yarn-parser"])
indexer.run(["https://github.com/librariesio/yarn-parser"] * 2)
origin = "https://github.com/librariesio/yarn-parser"
dir_id = DIRECTORY2.id
dir_results = list(indexer.idx_storage.directory_intrinsic_metadata_get([dir_id]))
> assert len(dir_results) == 1
E assert 0 == 1
E + where 0 = len([])
.tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_origin_metadata.py:128: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 4 2022, 2:14 PM