Page MenuHomeSoftware Heritage

cli.admin: Add remaining coverage on `swh deposit reschedule` cli
ClosedPublic

Authored by ardumont on Oct 14 2020, 12:39 PM.

Details

Summary

This adds the remaining missing coverage on the swh deposit reschedule cli.
This also clarifies the messages in the runtime code, this serves multiple purposes:

  • 1. message were not always clear
  • 2. allows to use f-string which clarifies technically the code
  • 3. ultimately, the coverage is then shown by jenkins in this very diff...

This cli allows to reschedule deposit ingestions which failed or got missed for some reason.

Test Plan

tox

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16262
Build 25022: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 25021: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4256 (id=15033)

Could not rebase; Attempt merge onto 2f5300e60a...

Merge made by the 'recursive' strategy.
 swh/deposit/api/deposit_update.py    |  24 +++
 swh/deposit/cli/admin.py             |  80 +++++-----
 swh/deposit/tests/cli/conftest.py    |  12 ++
 swh/deposit/tests/cli/test_admin.py  | 296 +++++++++++++++++++++++++++++++++++
 swh/deposit/tests/cli/test_client.py |   8 +-
 5 files changed, 378 insertions(+), 42 deletions(-)
 create mode 100644 swh/deposit/tests/cli/conftest.py
 create mode 100644 swh/deposit/tests/cli/test_admin.py
Changes applied before test
commit 8722641d233b973f6c2cd95587095837e01fa058
Merge: 2f5300e6 19fd75bd
Author: Jenkins user <jenkins@localhost>
Date:   Wed Oct 14 10:39:42 2020 +0000

    Merge branch 'diff-target' into HEAD

commit 19fd75bdf1f321697e5a2d15537edc8a48866b4f
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 12:40:03 2020 +0200

    cli.admin: Add remaining coverage on `swh deposit reschedule` cli

commit acf202c5bb810f5700f1a317b72b8d2734f47c49
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 11:44:08 2020 +0200

    Add validation step after metadata ingestion of a metadata-only deposit
    
    Related to T2681

commit f17263e2ad2ac5f52fd4f2eb0deac58e9b9dc374
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Oct 13 14:59:50 2020 +0200

    deposit.cli.admin: Add types and coverage on module
    
    This will allow to be more confident when we will refactor the configuration
    part.

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

ardumont edited the summary of this revision. (Show Details)

Add missing nominal scenario coverage

ardumont retitled this revision from wip: cli.admin: Add remaining coverage on `swh deposit reschedule` cli to cli.admin: Add remaining coverage on `swh deposit reschedule` cli.Oct 14 2020, 1:27 PM
ardumont edited the summary of this revision. (Show Details)
ardumont added a project: SWORD deposit.
ardumont edited the summary of this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)

Build is green

Patch application report for D4256 (id=15034)

Could not rebase; Attempt merge onto 2f5300e60a...

Merge made by the 'recursive' strategy.
 swh/deposit/api/deposit_update.py    |  24 +++
 swh/deposit/cli/admin.py             |  80 +++++----
 swh/deposit/tests/cli/conftest.py    |  12 ++
 swh/deposit/tests/cli/test_admin.py  | 317 +++++++++++++++++++++++++++++++++++
 swh/deposit/tests/cli/test_client.py |   8 +-
 5 files changed, 399 insertions(+), 42 deletions(-)
 create mode 100644 swh/deposit/tests/cli/conftest.py
 create mode 100644 swh/deposit/tests/cli/test_admin.py
Changes applied before test
commit 0238055d99455a6a5a29216674738fa07c20ced9
Merge: 2f5300e6 588d6a3a
Author: Jenkins user <jenkins@localhost>
Date:   Wed Oct 14 11:26:59 2020 +0000

    Merge branch 'diff-target' into HEAD

commit 588d6a3a5d9e896c303439d6dcf70172991ad2b9
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 12:40:03 2020 +0200

    cli.admin: Add remaining coverage on `swh deposit reschedule` cli

commit acf202c5bb810f5700f1a317b72b8d2734f47c49
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 11:44:08 2020 +0200

    Add validation step after metadata ingestion of a metadata-only deposit
    
    Related to T2681

commit f17263e2ad2ac5f52fd4f2eb0deac58e9b9dc374
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Oct 13 14:59:50 2020 +0200

    deposit.cli.admin: Add types and coverage on module
    
    This will allow to be more confident when we will refactor the configuration
    part.

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

Build is green

Patch application report for D4256 (id=15041)

Could not rebase; Attempt merge onto 2f5300e60a...

Updating 2f5300e6..34e710d0
Fast-forward
 swh/deposit/api/deposit_update.py    |  24 +++
 swh/deposit/cli/admin.py             |  80 +++++----
 swh/deposit/tests/cli/conftest.py    |  12 ++
 swh/deposit/tests/cli/test_admin.py  | 317 +++++++++++++++++++++++++++++++++++
 swh/deposit/tests/cli/test_client.py |   8 +-
 5 files changed, 399 insertions(+), 42 deletions(-)
 create mode 100644 swh/deposit/tests/cli/conftest.py
 create mode 100644 swh/deposit/tests/cli/test_admin.py
Changes applied before test
commit 34e710d07e88bb18e63a035e594a0bff7675b927
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 12:40:03 2020 +0200

    cli.admin: Add remaining coverage on `swh deposit reschedule` cli

commit 06f437255a222dbd42d788f6f143366ce1b41979
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 11:44:08 2020 +0200

    Add validation step after metadata ingestion of a metadata-only deposit
    
    Related to T2681

commit 51446a11df5cbd6608b282135ea5f2ff30791397
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Oct 13 14:59:50 2020 +0200

    deposit.cli.admin: Add types and coverage on module
    
    This will allow to be more confident when we will refactor the configuration
    part.

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

Build is green

Patch application report for D4256 (id=15050)

Rebasing onto 51446a11df...

Current branch diff-target is up to date.
Changes applied before test
commit 4bb8a36d7a65ce65cf7302fd7a6b7b137fe7531e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 14 12:40:03 2020 +0200

    deposit.cli.admin: Add remaining coverage on `swh deposit reschedule`

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

This revision was not accepted when it landed; it landed in state Needs Review.Oct 14 2020, 4:29 PM
This revision was automatically updated to reflect the committed changes.