Page MenuHomeSoftware Heritage

test_storage: Add missing tests on origin_visit_get method
ClosedPublic

Authored by ardumont on Jun 24 2020, 5:18 PM.

Details

Summary

I'm planning to change the default order of the returned results (and test with
it) [1]

[1] D3350#82121 for more details.

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Branch
add-missing-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13112
Build 20002: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 20001: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D3349 (id=11871)

Rebasing onto 621fc8d377...

Current branch diff-target is up to date.
Changes applied before test
commit e2981059d761a6773cbec4a327c5e72450834bbb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 24 17:11:36 2020 +0200

    test_storage: Add missing tests on origin_visit_get method

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/344/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/344/console

Build has FAILED

Patch application report for D3349 (id=11871)

Rebasing onto 621fc8d377...

Current branch diff-target is up to date.
Changes applied before test
commit e2981059d761a6773cbec4a327c5e72450834bbb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 24 17:11:36 2020 +0200

    test_storage: Add missing tests on origin_visit_get method

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/346/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/346/console

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/storage/tests/test_storage.py
1458

nit:

visits = swh_storage.origin_visit_add([visit1, visit2, visit3])
ov1, ov2, ov3 = [v.to_dict() for v in [ov1, ov2, ov3]]

then you can get rid of the list comprehensions below.

This revision is now accepted and ready to land.Jun 25 2020, 10:01 AM
ardumont edited the summary of this revision. (Show Details)
swh/storage/tests/test_storage.py
1458

thanks ;)

ardumont edited the summary of this revision. (Show Details)
  • Adapt according to review
  • Rebase on D3342 (so builds fine)

Build is green

Patch application report for D3349 (id=11888)

Could not rebase; Attempt merge onto 621fc8d377...

Updating 621fc8d3..7d7cb1dc
Fast-forward
 requirements-swh.txt               |   2 +-
 sql/upgrades/155.sql               |  34 +++
 swh/storage/backfill.py            |  10 +-
 swh/storage/cassandra/cql.py       |   3 -
 swh/storage/cassandra/schema.py    |   3 -
 swh/storage/cassandra/storage.py   |  15 +-
 swh/storage/db.py                  |  27 +--
 swh/storage/in_memory.py           |  18 +-
 swh/storage/sql/30-swh-schema.sql  |  11 +-
 swh/storage/sql/40-swh-func.sql    |   4 +-
 swh/storage/sql/60-swh-indexes.sql |   2 +-
 swh/storage/storage.py             |  10 +-
 swh/storage/tests/test_backfill.py |   5 +-
 swh/storage/tests/test_storage.py  | 455 +++++++++++++++++--------------------
 14 files changed, 293 insertions(+), 306 deletions(-)
 create mode 100644 sql/upgrades/155.sql
Changes applied before test
commit 7d7cb1dc01a2c92516b6ae1aad73bce07ed57a49
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 24 17:11:36 2020 +0200

    test_storage: Add missing tests on origin_visit_get method

commit e5e80efeedecd90794e18abbf6815edb6b991a3e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 24 10:57:52 2020 +0200

    storage*: Drop obsolete fields from origin_visit
    
    Related to T2310

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

Build has FAILED

Patch application report for D3349 (id=11897)

Rebasing onto 89e9dae604...

Current branch diff-target is up to date.
Changes applied before test
commit b991e697074a5aaf57f2b213baef5b42637e2893
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 24 17:11:36 2020 +0200

    test_storage: Add missing tests on origin_visit_get method

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/355/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/355/console

Build is green

Patch application report for D3349 (id=11897)

Rebasing onto 89e9dae604...

Current branch diff-target is up to date.
Changes applied before test
commit b991e697074a5aaf57f2b213baef5b42637e2893
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 24 17:11:36 2020 +0200

    test_storage: Add missing tests on origin_visit_get method

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