Page MenuHomeSoftware Heritage

test_npm: Adapt content_get_metadata call to content_get
ClosedPublic

Authored by ardumont on Aug 7 2020, 12:58 AM.

Details

Summary

Related to T645

Test Plan

tox
(failing until storage release > 0.12)

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 D3735 (id=13141)

Could not rebase; Attempt merge onto b0dd6219fb...

Updating b0dd621..1c0a48a
Fast-forward
 swh/loader/package/npm/tests/test_npm.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Changes applied before test
commit 1c0a48a1bd56d83bf35fe4a27d67e4ab8f85556a
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Aug 7 00:57:05 2020 +0200

    test_npm: Adapt content_get_metadata call to content_get
    
    Related to T645

commit bc793c1776067c187a9951c4cf954a88884a4f13
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Aug 6 23:12:32 2020 +0200

    npm: Fix assertion to use the correct storage api

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

vlorentz added a subscriber: vlorentz.

Explain in the commit message it's because the endpoint was renamed

swh/loader/package/npm/tests/test_npm.py
375

I don't like negative in conditionals with an else block, could you use 0 if content is None else 1?

This revision is now accepted and ready to land.Aug 7 2020, 9:36 AM
vlorentz requested changes to this revision.Aug 7 2020, 9:37 AM
This revision now requires changes to proceed.Aug 7 2020, 9:37 AM
swh/loader/package/npm/tests/test_npm.py
375

yeah, better.
thanks.

Build is green

Patch application report for D3735 (id=13160)

Could not rebase; Attempt merge onto b0dd6219fb...

Updating b0dd621..57d3e37
Fast-forward
 swh/loader/package/npm/tests/test_npm.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Changes applied before test
commit 57d3e372fad80041cb33f1b4413673d1730efda2
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Aug 7 00:57:05 2020 +0200

    test_npm: Adapt content_get_metadata call to content_get
    
    Related to T645

commit bc793c1776067c187a9951c4cf954a88884a4f13
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Aug 6 23:12:32 2020 +0200

    npm: Fix assertion to use the correct storage api

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

This revision is now accepted and ready to land.Aug 7 2020, 12:57 PM

Build is green

Patch application report for D3735 (id=13160)

Rebasing onto bc793c1776...

Current branch diff-target is up to date.
Changes applied before test
commit 57d3e372fad80041cb33f1b4413673d1730efda2
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Aug 7 00:57:05 2020 +0200

    test_npm: Adapt content_get_metadata call to content_get
    
    Related to T645

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