ga4gh / ga4gh-server

Reference implementation of the APIs defined in ga4gh-schemas. RETIRED 2018-01-24
http://ga4gh.org
Apache License 2.0
96 stars 91 forks source link

searchReadGroupSets returns SearchReadGroupSetsResponse with readGroupSets == null for nonexistent dataset ID #538

Closed hjellinek closed 9 years ago

hjellinek commented 9 years ago

Background: I'm using data from the server unit tests as the server's data. There is a single dataset, dataset1, with files arranged like so:

dataset1/
    reads/
        1kg-low-coverage/
            ... BAM files ...
        wgBam/
            ... BAM files ...
    variants/

Action: I create a SearchReadGroupSetsRequest with datasetId = xyzzy (as you see above, there is no such dataset) and the other fields unset (left as their default values).

Expected: The call to searchReadGroupSets will return a SearchReadGroupSetsResponse with its readGroupSets field containing an empty array.

Actual: The call to searchReadGroupSets returns a SearchReadGroupSetsResponse with its readGroupSets field set to null.

jeromekelleher commented 9 years ago

Yep, this is a bug. Thanks @hjellinek, you're doing a great job weeding out all these problems!

Although, I think this should raise a 404 error rather than returning an empty result set.

hjellinek commented 9 years ago

You're welcome @jeromekelleher - the new Compliance Test Kit makes it pretty easy to write and execute tests like this.

jeromekelleher commented 9 years ago

This was fixed by recent updates. Tests for this are testReadGroupSetsSearch in test_simulated_stack.py.