Page MenuHomeSoftware Heritage

deposit_update: Drop the unneeded check on the directory_missing call
ClosedPublic

Authored by ardumont on Sep 28 2020, 1:19 PM.

Details

Summary

We are working with a SWHID generated by the deposit which is already tested in
another way. This checks is thus redundant.

Related to D4013#100594

Test Plan

tox

Diff Detail

Event Timeline

Build is green

Patch application report for D4059 (id=14333)

Could not rebase; Attempt merge onto d1f3f69c90...

Updating d1f3f69c..a45abb07
Fast-forward
 MANIFEST.in                                        |   1 +
 swh/deposit/api/checks.py                          |  54 ++++++++++
 swh/deposit/api/deposit_update.py                  |  26 +++--
 swh/deposit/api/private/deposit_check.py           |  51 +---------
 swh/deposit/tests/api/test_checks.py               |  78 +++++++++++++++
 .../tests/api/test_deposit_private_check.py        |  77 +--------------
 swh/deposit/tests/api/test_deposit_update.py       | 110 +++++++++++++++------
 .../entry-data-fail-metadata-functional-checks.xml |   7 ++
 8 files changed, 233 insertions(+), 171 deletions(-)
 create mode 100644 swh/deposit/api/checks.py
 create mode 100644 swh/deposit/tests/api/test_checks.py
 create mode 100644 swh/deposit/tests/data/atom/entry-data-fail-metadata-functional-checks.xml
Changes applied before test
commit a45abb07cdaa35f8214aeae4e599fcc3cb7c8a81
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 28 13:18:58 2020 +0200

    deposit_update: Drop the unneeded check on the directory_missing call
    
    We are working with a SWHID generated by the deposit which is already tested in
    another way. This checks is thus redundant.

commit 56498f0d69c8c242ad8d7d60e7527b9d99d41995
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sun Sep 27 15:36:32 2020 +0200

    Check updated metadata are correctly stored in the metadata storage

commit 92f99745f35b95b1717d9344bd9b4e3f74b0cc20
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Sep 25 13:31:29 2020 +0200

    Add functional metadata checks prior to updating them
    
    This refactor the common code executed by the checker so we functionally check
    everything the same way.

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

This revision is now accepted and ready to land.Sep 28 2020, 1:38 PM

Build is green

Patch application report for D4059 (id=14341)

Rebasing onto 36d6b760f4...

Current branch diff-target is up to date.
Changes applied before test
commit 7560021ad09a1187c9393ef4b3ffeffb1f0e13cf
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 28 13:18:58 2020 +0200

    deposit_update: Drop the unneeded check on the directory_missing call
    
    We are working with a SWHID generated by the deposit which is already tested in
    another way. This checks is thus redundant.

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