Page MenuHomeSoftware Heritage

Fix tests' storage_data
ClosedPublic

Authored by douardda on Mon, Jun 22, 10:14 AM.

Details

Summary
  • one revision was actually invalid (extra_header metadata being used in

hash computation)

  • ensure ids are correct in tests' storage_data
  • also add an "objects" dict to easily retrieve available objects from their

object_type.

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

douardda created this revision.Mon, Jun 22, 10:14 AM

Build is green

Patch application report for D3325 (id=11776)

Could not rebase; Attempt merge onto 9514a1db60...

Updating 9514a1d..76a3701
Fast-forward
 swh/storage/sql/60-swh-indexes.sql |  7 ++--
 swh/storage/tests/storage_data.py  | 65 ++++++++++++++++++++++++--------------
 2 files changed, 45 insertions(+), 27 deletions(-)
Changes applied before test
commit 76a370194c1eaf996db2c36b1323489475064334
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Jun 18 18:38:39 2020 +0200

    Ensure ids are correct in tests' storage_data
    
    Also add an "objects" dict to easily retrieve available objects from their
    object_type.

commit f00d7823d2584443a13bd2ce7ece6300c7bdaf11
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Jun 18 18:37:20 2020 +0200

    Fix tests' storage_data revisions
    
    on of them was actually invalid (extra_header metadata being used in
    hash computation)

commit 19354bcd7e44cd0241180de9034b47c1df64737d
Author: David Douard <david.douard@sdfa3.org>
Date:   Mon Jun 22 10:05:37 2020 +0200

    SQL: replace the hash(url) index by a unique btree(url) on the origin table
    
    This ensures unicity of url in the origin table.

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

ardumont accepted this revision.Mon, Jun 22, 10:41 AM
ardumont added a subscriber: ardumont.

looks good.

swh/storage/tests/storage_data.py
533

There might be some simplification in another part of the tests which expose something similar (pytest wise iirc).
Not that i ask you to do it now heh ;)

This revision is now accepted and ready to land.Mon, Jun 22, 10:41 AM
douardda added inline comments.Mon, Jun 22, 10:58 AM
swh/storage/tests/storage_data.py
533

I'll have a look, thx.

douardda updated this revision to Diff 11780.Mon, Jun 22, 11:02 AM

typo in commit msg

This revision was landed with ongoing or failed builds.Mon, Jun 22, 11:02 AM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D3325 (id=11780)

Rebasing onto 53c4392acc...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-321-D3325.
Changes applied before test

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