Skip to content

integration tests for https://github.com/uc-cdis/guppy/pull/331#537

Open
grugna wants to merge 8 commits into
uc-cdis:masterfrom
grugna:patch-1
Open

integration tests for https://github.com/uc-cdis/guppy/pull/331#537
grugna wants to merge 8 commits into
uc-cdis:masterfrom
grugna:patch-1

Conversation

@grugna
Copy link
Copy Markdown

@grugna grugna commented Apr 27, 2026

Link to JIRA ticket if there is one:

New Features

Breaking Changes

Bug Fixes

Improvements

Dependency updates

Deployment changes

@grugna
Copy link
Copy Markdown
Author

grugna commented Apr 27, 2026

I am not sure what is the data loaded for the query, so we'll need to update the expected responses.

Comment thread gen3-integration-tests/test_data/guppy/test_response10.json Outdated
Comment thread gen3-integration-tests/tests/test_guppy_service.py Outdated
queryFile = "test_query9.json"
responseFile = "test_response9.json"
queryType = "data"
assert guppy.validate_guppy_query(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is failing with

actualResponse = [{'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, ...]
expectedResponse = [{'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, {'gender': 'male'}, ...]

    def match_data_query(self, actualResponse, expectedResponse):
        """ "
        Function to validate API Call output against responseFile
        for Download/Default query type
        """
>       assert len(actualResponse) == len(expectedResponse)
E       AssertionError

services/guppy.py:158: AssertionError

And I'm still trying to figure out why, because the number of entries in the test file seems right to me 🤔

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the query is only going to return the first 10 result from Guppy because the first argument is missing and 10 would be its default value https://github.com/uc-cdis/guppy/blob/master/doc/queries.md?plain=1#L134

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that would also be true for other test cases we added in here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfshao ok, I updated that. Let me know if you see any other errors or we are good to merge this and the guppy one.

grugna and others added 4 commits May 15, 2026 15:01
Co-authored-by: Mingfei Shao <2475897+mfshao@users.noreply.github.com>
Co-authored-by: Mingfei Shao <2475897+mfshao@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants