Page MenuHomeSoftware Heritage

maven: Use real data from github API + rely on requests_mock_datadir
ClosedPublic

Authored by vlorentz on Oct 13 2022, 6:28 PM.

Diff Detail

Repository
rDLS Listers
Branch
maven
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 32297
Build 50589: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 50588: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8681 (id=31349)

Could not rebase; Attempt merge onto a681f2f405...

Updating a681f2f..db2f2f8
Fast-forward
 .../{https_maven.org => }/citrus-parent-3.0.7.pom  |   0
 .../repos_aldialimucaj_sprova4j                    | 110 +++++++++++++++++
 .../repos_arangodb-community_arangodb-graphql-java | 130 +++++++++++++++++++++
 .../data/https_api.github.com/repos_webx_citrus    | 124 ++++++++++++++++++++
 ...ven2_al_aldi_sprova4j_0.1.0_sprova4j-0.1.0.pom} |   0
 ...ven2_al_aldi_sprova4j_0.1.1_sprova4j-0.1.1.pom} |   0
 ..._arangodb-graphql_1.2_arangodb-graphql-1.2.pom} |   0
 .../sprova4j-0.1.0.malformed.pom                   |   0
 swh/lister/maven/tests/test_lister.py              |  94 +++++----------
 9 files changed, 393 insertions(+), 65 deletions(-)
 rename swh/lister/maven/tests/data/{https_maven.org => }/citrus-parent-3.0.7.pom (100%)
 create mode 100644 swh/lister/maven/tests/data/https_api.github.com/repos_aldialimucaj_sprova4j
 create mode 100644 swh/lister/maven/tests/data/https_api.github.com/repos_arangodb-community_arangodb-graphql-java
 create mode 100644 swh/lister/maven/tests/data/https_api.github.com/repos_webx_citrus
 rename swh/lister/maven/tests/data/{https_maven.org/sprova4j-0.1.0.pom => https_repo1.maven.org/maven2_al_aldi_sprova4j_0.1.0_sprova4j-0.1.0.pom} (100%)
 rename swh/lister/maven/tests/data/{https_maven.org/sprova4j-0.1.1.pom => https_repo1.maven.org/maven2_al_aldi_sprova4j_0.1.1_sprova4j-0.1.1.pom} (100%)
 rename swh/lister/maven/tests/data/{https_maven.org/arangodb-graphql-1.2.pom => https_repo1.maven.org/maven2_com_arangodb_arangodb-graphql_1.2_arangodb-graphql-1.2.pom} (100%)
 rename swh/lister/maven/tests/data/{https_maven.org => }/sprova4j-0.1.0.malformed.pom (100%)
Changes applied before test
commit db2f2f8265cc03ff72d661761820eb07b0fdc564
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Oct 13 18:28:17 2022 +0200

    maven: Use real data from github API + rely on requests_mock_datadir

commit f7ac524a558dd63a16ae04c878d1e14db034adad
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Oct 13 17:57:55 2022 +0200

    maven: Use requests_mock_datadir to simplify mocking.

commit 3dbe77156cab18ad532dfc363b1a5a7a42f26b4e
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Oct 13 17:41:11 2022 +0200

    maven: Make assertions more useful
    
    By using set equality, pytest can diff both operands; whereas equality
    comparisons failures are harder to read.

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

This revision is now accepted and ready to land.Oct 13 2022, 7:15 PM