-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure pgtap errors get caught #46
Conversation
I still don't get how the tests pass on GitHub while on my local machine the added tests returns
I'm not quite sure the pgtap tests are being run in CI at all 🤷♂️ |
confirmed the latest commit shows that the result of the pgtap command returns
but the pgstac/scripts/bin/migra_funcs Lines 48 to 54 in d1f4df4
|
echo "PGTap tests failed." | ||
echo "$TESTOUTPUT" | grep '^not' | ||
echo "$TESTOUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's print all the output from pgtap to help debug
select '{"next": null, "prev": null, "type": "FeatureCollection", "context": {"limit": 10, "matched": 0, "returned": 0}, "features": []}'::jsonb | ||
$$, | ||
'Test collections search return empty feature not null' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add tests to prove #45
🥳 we now have 3 tests failing
test 75, shows the behaviour of #45. The two others will need deeper looks |
@@ -845,7 +843,7 @@ context := jsonb_strip_nulls(jsonb_build_object( | |||
|
|||
collection := jsonb_build_object( | |||
'type', 'FeatureCollection', | |||
'features', out_records, | |||
'features', coalesce(out_records, '[]'::jsonb), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simple fix to make sure features
is at least set to []
.
I couldn't track down where in https://github.com/stac-utils/pgstac/pull/46/files#diff-3c3e93de12c078e7f46e264188fcc2ba82eefd77be73795f964ad132d89af285R835 the transformation from []
to null
was 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 tests still fails 🤷♂️
😭 but it works locally 😭
…ith collection vs collections
@vincentsarago I think one of your tests was failing due to not having regenerated the migrations files (/scripts/stageversion). The other two were failing because there was an additional place where the error I fixed before I left with "sort" vs "sortby" was still wrong. When looking for this, I also fixed and added tests for a bug where I had used "id" rather than "ids". |
ref: #45