Page MenuHomeSoftware Heritage

test_client: Migrate slug generation scenario to use requests_mock_datadir
ClosedPublic

Authored by ardumont on Oct 8 2020, 7:31 PM.

Details

Summary

instead of mock

Depends on D4206

Test Plan

tox

Diff Detail

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

Event Timeline

ardumont created this revision.Oct 8 2020, 7:31 PM

Build is green

Patch application report for D4207 (id=14838)

Could not rebase; Attempt merge onto cd9c04afe6...

Updating cd9c04af..5a2ce131
Fast-forward
 conftest.py                                        |   6 +-
 pytest.ini                                         |   2 +-
 swh/deposit/cli/client.py                          | 109 +++++++-------
 swh/deposit/tests/cli/test_client.py               | 157 +++++++++++----------
 swh/deposit/tests/conftest.py                      |  14 ++
 .../data/https_deposit.swh.test/1_servicedocument  |  26 ++++
 .../tests/data/https_deposit.swh.test/1_test       |  19 +++
 swh/deposit/tests/loader/conftest.py               |  14 --
 8 files changed, 205 insertions(+), 142 deletions(-)
 create mode 100644 swh/deposit/tests/data/https_deposit.swh.test/1_servicedocument
 create mode 100644 swh/deposit/tests/data/https_deposit.swh.test/1_test
Changes applied before test
commit 5a2ce1316d9df69aabf16660cc092578f9ab117d
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:32:30 2020 +0200

    test_client: Migrate slug generation scenario to use requests_mock_datadir
    
    instead of mock

commit b035c9593b6c5ccef1d8d96d15f9ef5b26d7e0d0
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:22:46 2020 +0200

    test_client: Migrate metadata validation scenario to use requests_mock_datadir
    
    instead of mock

commit ff8457630b548728349aae18f5cbc223c942ef02
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:08:34 2020 +0200

    test_client: Migrate single deposit scenario to use requests_mock_datadir

commit 2b4ad2cfe1927507b0e182ec3f15a3a733ad5ae2
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 18:41:51 2020 +0200

    test_client: Migrate collection ok test scenario to use requests_mock_datadir
    
    instead of mock

commit 7dc727087b99159335e3daf90b5a1c4180ebf5e6
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 15:56:09 2020 +0200

    cli.client: Add types

commit 98dcf27419726acb0e3cefaf1859346abffa4546
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Oct 7 15:08:29 2020 +0200

    conftest: Declare swh.core pytest_plugin

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

vlorentz accepted this revision.Oct 9 2020, 11:37 AM
This revision is now accepted and ready to land.Oct 9 2020, 11:37 AM

Build is green

Patch application report for D4207 (id=14869)

Could not rebase; Attempt merge onto b9e98c0c96...

Updating b9e98c0c..0d71b43a
Fast-forward
 swh/deposit/tests/cli/test_client.py               | 139 ++++++++++-----------
 swh/deposit/tests/conftest.py                      |  14 +++
 .../tests/data/https_deposit.swh.test/1_test       |  19 +++
 swh/deposit/tests/loader/conftest.py               |  14 ---
 4 files changed, 102 insertions(+), 84 deletions(-)
 create mode 100644 swh/deposit/tests/data/https_deposit.swh.test/1_test
Changes applied before test
commit 0d71b43ad3d86f3ca8065bb5e19cbc07e8abcfd4
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:32:30 2020 +0200

    test_client: Migrate slug generation scenario to use requests_mock_datadir
    
    instead of mock

commit c377c3b66c3fcfc1093fd2f8f997ef487beebe7a
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:22:46 2020 +0200

    test_client: Migrate metadata validation scenario to use requests_mock_datadir
    
    instead of mock

commit af8381f853f5144ee44a49bfcfb5efb5ef8646fa
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Thu Oct 8 19:08:34 2020 +0200

    test_client: Migrate single deposit scenario to use requests_mock_datadir

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