Page MenuHomeSoftware Heritage

improve test coverage of file additions and deletions
ClosedPublic

Authored by stsp on Oct 30 2021, 2:01 PM.

Details

Summary

Make an existing test case run over pserver as well.
This access method uses a different way of detecting file
additions and deletions and should be tested separately.

Add new tests to cover the re-addition of a file after it
was deleted.

Diff Detail

Repository
rDLDCVS CVS Loader
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24953
Build 38994: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 38993: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6592 (id=23954)

Could not rebase; Attempt merge onto beb7fc8a02...

Updating beb7fc8..0eb3b30
Fast-forward
 swh/loader/cvs/cvsclient.py                     |  31 +++-
 swh/loader/cvs/loader.py                        |   6 +-
 swh/loader/cvs/tests/data/greek-repository4.tgz | Bin 0 -> 12393 bytes
 swh/loader/cvs/tests/data/greek-repository5.tgz | Bin 0 -> 12380 bytes
 swh/loader/cvs/tests/test_loader.py             | 219 +++++++++++++++++++++++-
 5 files changed, 243 insertions(+), 13 deletions(-)
 create mode 100644 swh/loader/cvs/tests/data/greek-repository4.tgz
 create mode 100644 swh/loader/cvs/tests/data/greek-repository5.tgz
Changes applied before test
commit 0eb3b30c24d60b6e0b72b983d4e90acdde33ba77
Author: Stefan Sperling <stsp@stsp.name>
Date:   Sat Oct 30 13:56:58 2021 +0200

    improve test coverage of file additions and deletions
    
    Make an existing test case run over pserver as well.
    This access method uses a different way of detecting file
    additions and deletions and should be tested separately.
    
    Add new tests to cover the re-addition of a file after it
    was deleted.

commit 32ff92ed3e13f3fe63fff53d79e1d07881d64291
Author: Stefan Sperling <stsp@stsp.name>
Date:   Sat Oct 30 13:55:23 2021 +0200

    display file state in progress logging output

commit acc2601ae97ca729e3987de7cbd3548120e5d5a1
Author: Stefan Sperling <stsp@stsp.name>
Date:   Sat Oct 30 11:31:27 2021 +0200

    add support for RCS keyword expansion over pserver protocol
    
    We can simply ask the CVS server to expand keywords for us, instead
    of forcing binary file mode with the -kb option. The CVS repository
    contains per-file keyword expansion defaults the server will use.
    Files checked out by cvsclient.py should now match what a regular
    CVS client would check out by default.
    
    Add test cases which verify that we create the same snapshot ID
    for a repository which uses the Id keyword in a file, regardless
    of whether this repository is accessed via rsync or pserver.

commit 2563ac0917db60491fd3d3218a47d16c97083d13
Author: Stefan Sperling <stsp@stsp.name>
Date:   Thu Oct 28 19:04:05 2021 +0200

    in cvs loader tests, use f-strings to build repository URLs
    
    Suggested by ardumont in D6566

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

stsp requested review of this revision.Oct 30 2021, 2:03 PM
This revision is now accepted and ready to land.Nov 3 2021, 11:15 AM

Build is green

Patch application report for D6592 (id=24078)

Rebasing onto ca23bc13c2...

Current branch diff-target is up to date.
Changes applied before test
commit d72f15f24dbd4486348775b2bca6f046866599b5
Author: Stefan Sperling <stsp@stsp.name>
Date:   Sat Oct 30 13:56:58 2021 +0200

    improve test coverage of file additions and deletions
    
    Make an existing test case run over pserver as well.
    This access method uses a different way of detecting file
    additions and deletions and should be tested separately.
    
    Add new tests to cover the re-addition of a file after it
    was deleted.

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