Page MenuHomeSoftware Heritage

Refactor functional tests to use existing dataset
ClosedPublic

Authored by jayeshv on May 30 2022, 4:46 PM.

Details

Summary

re-use the dataset in swh-model

Diff Detail

Repository
rDGQL GraphQL API
Branch
snapshot-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29602
Build 46261: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 46260: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7908 (id=28512)

Rebasing onto 6ee8e01f52...

Current branch diff-target is up to date.
Changes applied before test
commit 027d4ef3d84c19bd6e7c66212c2739370a9cd971
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Mon May 30 10:47:39 2022 +0200

    Refactor functional tests to use existing dataset
    
    re-use the dataset in swh-model

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

ardumont added a subscriber: ardumont.

lgtm

A couple of remarks/suggestions inline.

swh/graphql/tests/functional/test_origin_connection.py
53–67

I usually prefer using format for pattern like this, that allows to give some more meaning to the value we are replacing in the string.

swh/graphql/tests/functional/test_origin_node.py
47

same remark... etc...

swh/graphql/tests/functional/utils.py
9

What do you think about adding types?

Even though that's test utilities, it might come in handy for future refactoring later.

This revision is now accepted and ready to land.May 31 2022, 2:15 PM
swh/graphql/tests/functional/utils.py
9

@ardumont Thanks. I will do that. In fact, type hints are missing in many modules and I have a ticket for adding those. T4261

Build is green

Patch application report for D7908 (id=28547)

Rebasing onto b312a60fad...

Current branch diff-target is up to date.
Changes applied before test
commit 00768c2e9eb2483925df4bed57dd4553840b045d
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Mon May 30 10:47:39 2022 +0200

    Refactor functional tests to use existing dataset
    
    re-use the dataset in swh-model

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