Page MenuHomeSoftware Heritage

Refactor functional tests
ClosedPublic

Authored by jayeshv on Oct 5 2022, 1:50 PM.

Details

Summary

Use named quries and input variables instead of creating query strings
Use gql documents instead of strings

Resolves T4554

Test Plan

No logic or test changes.

Diff Detail

Repository
rDGQL GraphQL API
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8629 (id=31149)

Rebasing onto 6e1c3e8ecf...

Current branch diff-target is up to date.
Changes applied before test
commit 6e4b33ecbe08923139deeebe13447f86389b43db
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Wed Oct 5 10:31:20 2022 +0200

    Refactor functional tests
    
    Use named quries and input variables instead of creating query strings
    Use gql documents instead of strings
    
    Resolves T4554

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

nice!

Have you considered switching to **kwargs instead of a single variables argument? I should make calls shorter (saves quotes and variables=)

This revision is now accepted and ready to land.Oct 5 2022, 1:59 PM

nice!

Have you considered switching to **kwargs instead of a single variables argument? I should make calls shorter (saves quotes and variables=)

That might be better, let me try that

jayeshv retitled this revision from Refactor functional tests to [WIP] Refactor functional tests.Oct 5 2022, 2:02 PM

Use kwargs instead of variables dict

jayeshv retitled this revision from [WIP] Refactor functional tests to Refactor functional tests.Oct 5 2022, 2:33 PM

Build is green

Patch application report for D8629 (id=31150)

Rebasing onto 6e1c3e8ecf...

Current branch diff-target is up to date.
Changes applied before test
commit 0f2eaba90f947a688044fc6a9aef54dea2bbdd93
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Wed Oct 5 10:31:20 2022 +0200

    Refactor functional tests
    
    Use named quries and input variables instead of creating query strings
    Use gql documents instead of strings
    
    Resolves T4554

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

This revision was automatically updated to reflect the committed changes.