Page MenuHomeSoftware Heritage

loaders.tests: Simplify and add coverage to check-snapshot
ClosedPublic

Authored by ardumont on Jul 7 2020, 1:16 PM.

Details

Summary

Tests are running with pg-storage instance. So we never pass there.
Also this method will get improved upon soon [1]

[1] T2483

This adds the necessary scenario to check the "no snapshot exist with that id" case.

Related to T2486

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

ardumont created this revision.Jul 7 2020, 1:16 PM
ardumont updated this revision to Diff 12197.Jul 7 2020, 1:17 PM

It's a f-string...

Build is green

Patch application report for D3444 (id=12196)

Rebasing onto b5caab2756...

Current branch diff-target is up to date.
Changes applied before test
commit eb76d27d26b2ce27c5b76fd0470511e18272cd95
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jul 7 13:15:18 2020 +0200

    loaders.tests: Drop dead code
    
    Tests are running with pg-storage instance. So we never pass there.
    
    Also this method will get improved upon soon [1]
    
    [1] T2483
    
    Related to T2486

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

Build is green

Patch application report for D3444 (id=12197)

Rebasing onto b5caab2756...

Current branch diff-target is up to date.
Changes applied before test
commit c8c02d48fcb6de6d23fcb0218f1771ed6ff47364
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jul 7 13:15:18 2020 +0200

    loaders.tests: Drop dead code
    
    Tests are running with pg-storage instance. So we never pass there.
    
    Also this method will get improved upon soon [1]
    
    [1] T2483
    
    Related to T2486

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

anlambert accepted this revision.Jul 7 2020, 1:52 PM
This revision is now accepted and ready to land.Jul 7 2020, 1:52 PM
ardumont updated this revision to Diff 12204.Jul 7 2020, 2:00 PM

Add missing test case: "no snapshot is found"

ardumont retitled this revision from loaders.tests: Drop dead code to loaders.tests: Simplify and add coverage to check-snapshot.Jul 7 2020, 2:00 PM
ardumont edited the summary of this revision. (Show Details)

Build is green

Patch application report for D3444 (id=12204)

Rebasing onto b5caab2756...

Current branch diff-target is up to date.
Changes applied before test
commit 3e48d63e8804f721583b6aa81a744007263de1c7
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Jul 7 13:15:18 2020 +0200

    loaders.tests: Simplify and add coverage to check_snapshot
    
    The uncovered conditional is dead code since tests no longer run with in-memory
    storage.
    
    This adds the necessary scenario to check the no snapshot found case is
    covered.
    
    Related to T2486

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

ardumont edited the summary of this revision. (Show Details)Jul 7 2020, 2:03 PM