Page MenuHomeSoftware Heritage

Add missing coverage on `swh db version` cli
ClosedPublic

Authored by ardumont on Jun 8 2022, 10:46 AM.

Details

Summary

Discovered when working on [1].

Related to T4228

[1] D7949

Diff Detail

Repository
rDCORE Foundations and core functionalities
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 D7968 (id=28710)

Could not rebase; Attempt merge onto e1a1d84eb4...

Updating e1a1d84..3c346da
Fast-forward
 swh/core/db/db_utils.py       |  9 +++++++++
 swh/core/db/tests/conftest.py | 13 +++++++++++++
 swh/core/db/tests/test_cli.py | 23 +++++++++++++++++++++++
 3 files changed, 45 insertions(+)
Changes applied before test
commit 3c346da3a9820917a6677f1b371ffa6a3d89b8d6
Author: Antoine R. Dumont (@ardumont) <antoine.romain.dumont@gmail.com>
Date:   Wed Jun 8 10:46:09 2022 +0200

    Add missing coverage on `swh db version` cli
    
    Discovered when working on [1].
    
    Related to T4228
    
    [1] D7949

commit 47d9e8e22fa6c88eadbd552eebfbc42e51f72813
Author: Antoine R. Dumont (@ardumont) <antoine.romain.dumont@gmail.com>
Date:   Tue May 31 09:18:03 2022 +0200

    db: Grant read access to guest user on all schema tables
    
    This now automatically grant read-only access to the guest user at db initialization or
    upgrade time. This way, sysadm no longer have to manually alter the schema after
    initialization or upgrade.
    
    Related to T4228

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

This revision is now accepted and ready to land.Jun 8 2022, 1:22 PM
vlorentz requested changes to this revision.Jun 8 2022, 1:24 PM
vlorentz added inline comments.
swh/core/db/tests/test_cli.py
353

"order by dbversion"? shouldn't it be "order by version"?

This revision now requires changes to proceed.Jun 8 2022, 1:24 PM
swh/core/db/tests/test_cli.py
353

yes

Build is green

Patch application report for D7968 (id=28722)

Rebasing onto 47d9e8e22f...

Current branch diff-target is up to date.
Changes applied before test
commit 5644f9cd33dabb5292988ccd9cd767fd52a9a069
Author: Antoine R. Dumont (@ardumont) <antoine.romain.dumont@gmail.com>
Date:   Wed Jun 8 10:46:09 2022 +0200

    Add missing coverage on `swh db version` cli
    
    Discovered when working on [1].
    
    Related to T4228
    
    [1] D7949

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

This revision is now accepted and ready to land.Jun 9 2022, 2:46 PM