Page MenuHomeSoftware Heritage

test_storage: Add missing tests on origin_visit_get method
ClosedPublic

Authored by ardumont on Wed, Jun 24, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Wed, Jun 24, 5:18 PM

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 accepted this revision.Thu, Jun 25, 10:01 AM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/storage/tests/test_storage.py
1459

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.Thu, Jun 25, 10:01 AM
ardumont edited the summary of this revision. (Show Details)Thu, Jun 25, 10:13 AM
ardumont edited the summary of this revision. (Show Details)
ardumont added inline comments.Thu, Jun 25, 11:37 AM
swh/storage/tests/test_storage.py
1459

thanks ;)

ardumont updated this revision to Diff 11888.Thu, Jun 25, 11:50 AM
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.

ardumont updated this revision to Diff 11897.Thu, Jun 25, 2:46 PM

Rebase on latest master

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.