Page MenuHomeSoftware Heritage

test: Update missing scenario on update metadata with multipart (put)
ClosedPublic

Authored by ardumont on Sep 25 2020, 2:14 PM.

Details

Summary

D4013 showed that scenario coverage was missing, this fixes it.

Test Plan

tox

Diff Detail

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

Event Timeline

Build is green

Patch application report for D4048 (id=14271)

Could not rebase; Attempt merge onto 047588a03f...

Updating 047588a0..07cf08d6
Fast-forward
 MANIFEST.in                                        |   1 +
 swh/deposit/__init__.py                            |  11 +
 swh/deposit/api/__init__.py                        |   7 -
 swh/deposit/api/checks.py                          |  54 ++++
 swh/deposit/api/common.py                          |  38 +--
 swh/deposit/api/deposit_update.py                  | 193 +++++++++++++-
 swh/deposit/api/private/deposit_check.py           |  51 +---
 swh/deposit/api/private/deposit_read.py            |  10 -
 swh/deposit/config.py                              |   7 +
 swh/deposit/tests/api/test_checks.py               |  78 ++++++
 swh/deposit/tests/api/test_deposit_atom.py         |   2 +
 .../tests/api/test_deposit_private_check.py        |  77 +-----
 .../api/test_deposit_private_read_metadata.py      |   2 +-
 swh/deposit/tests/api/test_deposit_update.py       | 296 ++++++++++++++++++++-
 swh/deposit/tests/conftest.py                      |  24 +-
 .../tests/data/atom/entry-data-empty-body.xml      |   2 +-
 .../entry-data-fail-metadata-functional-checks.xml |   7 +
 swh/deposit/tests/test_init.py                     |   2 +-
 18 files changed, 684 insertions(+), 178 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 07cf08d63bed96c59303848403aaa00c5a748a4b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Sep 25 14:14:20 2020 +0200

    test_deposit_update: Add missing scenario on multipart update

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

    Check new metadata pass the functional checks prior to update them

commit f94c9effa2437ae5fdfd5311361dfff20d4f0a83
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Sep 22 19:15:19 2020 +0200

    Allow deposit metadata update on deposit already completed
    
    This will allow to update the metadata of a deposit in "done" state. The
    metadata update occurs both in the deposit backend and in the metadata
    storage (provided some basic checks pass).

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

  • Rework commit message
  • drop spurious #noqa near the tests change so the coverage shows <- ikr ¯\_(ツ)_/¯
ardumont retitled this revision from test_deposit_update: Add missing scenario on multipart update to test: Update missing scenario on update metadata with multipart (post).Sep 25 2020, 2:30 PM
ardumont edited the summary of this revision. (Show Details)

Build is green

Patch application report for D4048 (id=14273)

Could not rebase; Attempt merge onto 7849f40a8a...

Merge made by the 'recursive' strategy.
 MANIFEST.in                                        |   1 +
 swh/deposit/__init__.py                            |  11 +
 swh/deposit/api/__init__.py                        |   7 -
 swh/deposit/api/checks.py                          |  54 ++++
 swh/deposit/api/common.py                          |  38 +--
 swh/deposit/api/deposit_update.py                  | 199 +++++++++++++-
 swh/deposit/api/private/deposit_check.py           |  51 +---
 swh/deposit/api/private/deposit_read.py            |  10 -
 swh/deposit/config.py                              |   7 +
 swh/deposit/tests/api/test_checks.py               |  78 ++++++
 swh/deposit/tests/api/test_deposit_atom.py         |   2 +
 .../tests/api/test_deposit_private_check.py        |  77 +-----
 .../api/test_deposit_private_read_metadata.py      |   2 +-
 swh/deposit/tests/api/test_deposit_update.py       | 296 ++++++++++++++++++++-
 swh/deposit/tests/conftest.py                      |  24 +-
 .../tests/data/atom/entry-data-empty-body.xml      |   2 +-
 .../entry-data-fail-metadata-functional-checks.xml |   7 +
 swh/deposit/tests/test_init.py                     |   2 +-
 18 files changed, 687 insertions(+), 181 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 afc10fd1351a30b13d8a9fee5530e33ab6ce724d
Merge: 7849f40a c217dfdd
Author: Jenkins user <jenkins@localhost>
Date:   Fri Sep 25 12:29:10 2020 +0000

    Merge branch 'diff-target' into HEAD

commit c217dfdddb0f955a68c9943a26506c43b8073682
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Sep 25 14:14:20 2020 +0200

    test: Update missing scenario on update metadata with multipart (put)

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

    Check new metadata pass the functional checks prior to update them

commit f94c9effa2437ae5fdfd5311361dfff20d4f0a83
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Sep 22 19:15:19 2020 +0200

    Allow deposit metadata update on deposit already completed
    
    This will allow to update the metadata of a deposit in "done" state. The
    metadata update occurs both in the deposit backend and in the metadata
    storage (provided some basic checks pass).

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

This revision is now accepted and ready to land.Sep 25 2020, 3:05 PM
ardumont retitled this revision from test: Update missing scenario on update metadata with multipart (post) to test: Update missing scenario on update metadata with multipart (put).Sep 25 2020, 3:24 PM

Make it the root diff of the current stack of diff

Build is green

Patch application report for D4048 (id=14309)

Rebasing onto b820c61d67...

First, rewinding head to replay your work on top of it...
Applying: test: Update missing scenario on update metadata with multipart (put)
Changes applied before test
commit a6cde82bf625070c8b72b47f3a8248929a8fcbb4
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Sep 25 14:14:20 2020 +0200

    test: Update missing scenario on update metadata with multipart (put)

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

/me *sighs* second round rebase, i forgot to pull --rebase first

Build is green

Patch application report for D4048 (id=14316)

Rebasing onto b820c61d67...

Current branch diff-target is up to date.
Changes applied before test
commit 251a0031eada21011d1683e6d755c1813830b97b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Sep 25 14:14:20 2020 +0200

    test: Update missing scenario on update metadata with multipart (put)

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