Page MenuHomeSoftware Heritage

test_nixguix: Merge check_snapshot* methods into 1
ClosedPublic

Authored by ardumont on Jul 16 2020, 6:24 PM.

Details

Summary

The secondary methods check a bit further that the metadata are in the
correct shape.

As we override the main check_snapshot and call the other one each time we call
check_snapshot. Might as well integrate the subsidiary checks within the
override.

Test Plan

tox

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D3540 (id=12491)

Could not rebase; Attempt merge onto cede65ed1f...

Updating cede65e..4df9a4a
Fast-forward
 swh/loader/package/nixguix/tests/test_nixguix.py | 224 ++++++++++-------------
 1 file changed, 92 insertions(+), 132 deletions(-)
Changes applied before test
commit 4df9a4a09790c690d9888d704c6b66c894180e80
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Jul 16 18:23:32 2020 +0200

    test_nixguix: Merge check_snapshot* methods into 1

commit 7c2b3668052a97e7e7b25fa0687b412b2010ebeb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Jul 16 18:22:18 2020 +0200

    test_nixguix: Check against snapshot model object
    
    Related to T2494

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

douardda added a subscriber: douardda.
douardda added inline comments.
swh/loader/package/nixguix/tests/test_nixguix.py
68

not related to this diff, but it would nice to have an explanation why this branch is skipped.

This revision is now accepted and ready to land.Jul 17 2020, 11:04 AM
swh/loader/package/nixguix/tests/test_nixguix.py
68

Yes, i think it is in the code though.

rationale:
The evaluation branch targets the nixpkgs repository (git repository not dealt with by this loader (yet?)).
At the time of the loader nixguix visit, it's most probably the case that we are not up-to-date with the nixpkgs repo yet. Hence that revision is unresolvable "right now" but it should eventually be consistent.

swh/loader/package/nixguix/tests/test_nixguix.py
68
swh/loader/package/nixguix/tests/test_nixguix.py
68

answered the concern in D3548 ;)