Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_in_memory.TestInMemoryStorage::test_snapshot_add_get_by_branches_name_pattern_filtered_paginated
Failed

TEST RESULT

Run At
Apr 29 2021, 10:23 AM
Details
self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7f3851c360f0> swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7f3851c36f28> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f38649e39b0> def test_snapshot_add_get_by_branches_name_pattern_filtered_paginated( self, swh_storage, sample_data ): pattern = b"foo" nb_branches_by_target_type = 10 branches = {} for i in range(nb_branches_by_target_type): branches[f"branch/directory/bar{i}".encode()] = SnapshotBranch( target=sample_data.directory.id, target_type=TargetType.DIRECTORY, ) branches[f"branch/revision/bar{i}".encode()] = SnapshotBranch( target=sample_data.revision.id, target_type=TargetType.REVISION, ) branches[f"branch/directory/{pattern}{i}".encode()] = SnapshotBranch( target=sample_data.directory.id, target_type=TargetType.DIRECTORY, ) branches[f"branch/revision/{pattern}{i}".encode()] = SnapshotBranch( target=sample_data.revision.id, target_type=TargetType.REVISION, ) snapshot = Snapshot(branches=branches) > swh_storage.snapshot_add([snapshot]) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:3356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7f3851c36f28> snapshots = [Snapshot(branches=ImmutableDict({b'branch/directory/bar0': SnapshotBranch(target=b'RV\xe8V\xa0\xa0\x89\x89f\xd6\xba\x...2', target_type=<TargetType.REVISION: 'revision'>)}), id=b'\xe7\xcfK.\xd3\x007\r\xd5^\x9c\xde_\x94\x19P\x0f\xfd\xa7|')] def snapshot_add(self, snapshots: List[Snapshot]) -> Dict: > if not self._allow_overwrite: E AttributeError: 'InMemoryStorage' object has no attribute '_allow_overwrite' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:668: AttributeError