Page MenuHomeSoftware Heritage

test: fix test_content_add_validation() for swh.model 0.0.64
AbandonedPublic

Authored by douardda on Apr 7 2020, 12:16 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Summary

since content_add may now raise a ValueError (originating from the model).

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11638
Build 17650: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 17649: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D2963 (id=10549)

Rebasing onto 82b41bac01...

Current branch diff-target is up to date.
Changes applied before test
commit 4106a3d3b186bf13812c627f1b2bc04dff5da047
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Apr 7 12:14:38 2020 +0200

    test: fix test_content_add_validation() for swh.model 0.0.64
    
    since content_add may now raise a ValueError (originating from the model).

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/52/ for more details.

This test did not fail with swh-model 0.0.64, see https://jenkins.softwareheritage.org/job/DSTO/job/tests/1085/consoleFull and it did not fail too when I execute it locally on current master of swh-storage.

Nevertheless, a lot of tests are now failing in storage since the latest model updates.

=================================================================================== short test summary info ===================================================================================
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_content_add - TypeError: 'Content' object is not subscriptable
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_content_add_from_lazy_content - TypeError: 'Content' object is not subscriptable
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_content_add_metadata - assert [('content', ...15, 697440)))] == [('content', ...F\x89', ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_directory_add - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_directory_add_from_generator - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_directory_add_twice - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_directory_get_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_directory_get_non_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_revision_add - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_revision_add_twice - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_revision_log - AssertionError: assert [('revision',...b?\x14\xf4'))] == [('revision',...7843}}, ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_release_add - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_release_add_from_generator - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_release_add_no_author_date - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_release_add_twice - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_add - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_add_from_generator - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_add_twice - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_visit_add - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file:///dev/zero...
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_visit_add_default_type - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='fil...
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_visit_update - AssertionError: assert ('origin', {'url': 'file:///dev/null'}) in [('origin', Origin(url='file:///dev/n...
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_visit_upsert_new - AssertionError: assert [('origin', O... visit=1234))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_visit_upsert_existing - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_origin_visit_upsert_missing_visit_id - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_snapshot_add_get_empty - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...0\x0e', ...})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_snapshot_add_twice - AssertionError: assert [('snapshot',...75\xa0\x0e'))] == [('snapshot',...75\xa0\x0e'})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_snapshot_add_nonexistent_visit - assert [('snapshot',...a7\xba\xb7"))] == [('snapshot',...a7\xba\xb7"})]
FAILED swh/storage/tests/test_api_client.py::TestStorage::test_snapshot_add_twice__by_origin_visit - assert [('origin', O...ne, visit=2))] == [('origin', {...a\xb7", ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_content_add - TypeError: 'Content' object is not subscriptable
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_content_add_metadata - assert [('content', ...30, 572428)))] == [('content', ...F\x89', ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_directory_add - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_directory_add_from_generator - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_directory_add_twice - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_directory_get_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_directory_get_non_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_revision_add - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_revision_add_twice - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_revision_log - AssertionError: assert [('revision',...b?\x14\xf4'))] == [('revision',...7843}}, ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_release_add - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_release_add_from_generator - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_release_add_no_author_date - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_release_add_twice - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_add - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_add_from_generator - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_add_twice - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_visit_add - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file:///de...
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_visit_add_default_type - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(ur...
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_visit_update - AssertionError: assert ('origin', {'url': 'file:///dev/null'}) in [('origin', Origin(url='file://...
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_visit_upsert_new - AssertionError: assert [('origin', O... visit=1234))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_visit_upsert_existing - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_origin_visit_upsert_missing_visit_id - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/z...
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_snapshot_add_get_empty - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...0\x0e', ...})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_snapshot_add_twice - AssertionError: assert [('snapshot',...75\xa0\x0e'))] == [('snapshot',...75\xa0\x0e'})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_snapshot_add_nonexistent_visit - assert [('snapshot',...a7\xba\xb7"))] == [('snapshot',...a7\xba\xb7"})]
FAILED swh/storage/tests/test_api_client_dicts.py::TestStorage::test_snapshot_add_twice__by_origin_visit - assert [('origin', O...ne, visit=2))] == [('origin', {...a\xb7", ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_content_add - TypeError: 'Content' object is not subscriptable
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_content_add_from_lazy_content - AttributeError: Can't pickle local object 'TestStorage.test_content_add_from_lazy_con...
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_content_add_metadata - assert [('content', ...30, 314457)))] == [('content', ...F\x89', ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_directory_add - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_directory_add_from_generator - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_directory_add_twice - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_directory_get_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_directory_get_non_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_revision_add - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_revision_add_twice - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_revision_log - AssertionError: assert [('revision',...b?\x14\xf4'))] == [('revision',...7843}}, ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_release_add - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_release_add_from_generator - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_release_add_no_author_date - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_release_add_twice - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_add - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_add_from_generator - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_add_twice - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_visit_add - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file:///...
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_visit_add_default_type - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(...
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_visit_update - AssertionError: assert ('origin', {'url': 'file:///dev/null'}) in [('origin', Origin(url='file:...
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_visit_upsert_new - AssertionError: assert [('origin', O... visit=1234))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_visit_upsert_existing - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_origin_visit_upsert_missing_visit_id - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev...
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_snapshot_add_get_empty - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...0\x0e', ...})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_snapshot_add_twice - AssertionError: assert [('snapshot',...75\xa0\x0e'))] == [('snapshot',...75\xa0\x0e'})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_snapshot_add_nonexistent_visit - assert [('snapshot',...a7\xba\xb7"))] == [('snapshot',...a7\xba\xb7"})]
FAILED swh/storage/tests/test_cassandra.py::TestCassandraStorage::test_snapshot_add_twice__by_origin_visit - assert [('origin', O...ne, visit=2))] == [('origin', {...a\xb7", ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_content_add - TypeError: 'Content' object is not subscriptable
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_content_add_from_lazy_content - AttributeError: Can't pickle local object 'TestStorage.test_content_add_from_lazy_content.<loc...
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_content_add_metadata - assert [('content', ...26, 820689)))] == [('content', ...F\x89', ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_directory_add - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_directory_add_from_generator - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_directory_add_twice - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_directory_get_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_directory_get_non_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_revision_add - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_revision_add_twice - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_revision_log - AssertionError: assert [('revision',...b?\x14\xf4'))] == [('revision',...7843}}, ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_release_add - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_release_add_from_generator - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_release_add_no_author_date - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_release_add_twice - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_add - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_add_from_generator - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_add_twice - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_visit_add - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file:///dev/zero'...
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_visit_add_default_type - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file...
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_visit_update - AssertionError: assert ('origin', {'url': 'file:///dev/null'}) in [('origin', Origin(url='file:///dev/nu...
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_visit_upsert_new - AssertionError: assert [('origin', O... visit=1234))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_visit_upsert_existing - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_origin_visit_upsert_missing_visit_id - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_snapshot_add_get_empty - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...0\x0e', ...})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_snapshot_add_twice - AssertionError: assert [('snapshot',...75\xa0\x0e'))] == [('snapshot',...75\xa0\x0e'})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_snapshot_add_nonexistent_visit - assert [('snapshot',...a7\xba\xb7"))] == [('snapshot',...a7\xba\xb7"})]
FAILED swh/storage/tests/test_in_memory.py::TestStorage::test_snapshot_add_twice__by_origin_visit - assert [('origin', O...ne, visit=2))] == [('origin', {...a\xb7", ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_content_add - TypeError: 'Content' object is not subscriptable
FAILED swh/storage/tests/test_storage.py::TestStorage::test_content_add_from_lazy_content - AttributeError: Can't pickle local object 'TestStorage.test_content_add_from_lazy_content.<local...
FAILED swh/storage/tests/test_storage.py::TestStorage::test_content_add_metadata - assert [('content', ...43, 621853)))] == [('content', ...F\x89', ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_directory_add - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_directory_add_from_generator - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_directory_add_twice - AssertionError: assert [('directory'...7\xc3\xa90'))] == [('directory'...7\xc3\xa90'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_directory_get_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_directory_get_non_recursive - AssertionError: assert [('directory'...6\xfd\x89!'))] == [('directory'...6\xfd\x89!'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_revision_add - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_revision_add_twice - AssertionError: assert [('revision',...5678901234'))] == [('revision',...7890}}, ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_revision_log - AssertionError: assert [('revision',...b?\x14\xf4'))] == [('revision',...7843}}, ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_release_add - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_release_add_from_generator - AssertionError: assert [('release', ...8765901234'))] == [('release', ...fixes', ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_release_add_no_author_date - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_release_add_twice - AssertionError: assert [('release', ...5678901234'))] == [('release', ...lease', ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_add - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_add_from_generator - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_add_twice - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_get_random - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_get_random_nothing_found - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_add - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file:///dev/zero'))...
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_add_default_type - AssertionError: assert ('origin', {'url': 'file:///dev/zero'}) in [('origin', Origin(url='file:/...
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_update - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_update_validation - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_update_missing_snapshot - assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_get_by - assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_upsert_new - AssertionError: assert [('origin', O... visit=1234))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_upsert_existing - AssertionError: assert [('origin', O...ne, visit=1))] == [('origin', {...: None, ...})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_upsert_missing_visit_id - AssertionError: assert [('origin', O...//dev/zero'))] == [('origin', {...//dev/zero'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_origin_visit_get_latest - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_get_empty - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_get_complete - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_twice - AssertionError: assert [('snapshot',...75\xa0\x0e'))] == [('snapshot',...75\xa0\x0e'})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_get_filtered - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_get - assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_nonexistent_visit - assert [('snapshot',...a7\xba\xb7"))] == [('snapshot',...a7\xba\xb7"})]
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_add_twice__by_origin_visit - assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_get_latest - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_snapshot_get_latest__missing_snapshot - AssertionError: assert False
FAILED swh/storage/tests/test_storage.py::TestStorage::test_stat_counters - assert False
FAILED swh/storage/tests/test_storage.py::TestStorageGeneratedData::test_origin_count_with_visit_with_visits_and_snapshot - assert False
FAILED swh/storage/tests/test_storage.py::TestPgStorage::test_content_add_db - TypeError: 'Content' object does not support item deletion
FAILED swh/storage/tests/test_storage.py::TestPgStorage::test_content_add_metadata_db - assert [('content', ...15, 780332)))] == [('content', ...F\x89', ...})]
======================================================= 154 failed, 710 passed, 23 skipped, 1 xfailed, 17 warnings in 431.80s (0:07:11) =======================================================
vlorentz requested changes to this revision.Apr 7 2020, 1:43 PM
vlorentz added a subscriber: vlorentz.

If the error is caused by an invalid argument, it should raise StorageArgumentException, not ValueError.

This revision now requires changes to proceed.Apr 7 2020, 1:43 PM

It seems not to be necessary (besides not being the proper fix, if any)