Closed sassela closed 2 years ago
This issue involves more of an audit of existing specs than I made clear in the original description, so I'm sorry about any duplicated effort that followed as a result.
Before porting over any more specs from pytest -> hspec, let's please clarify the state of work so far on BasicCommon tests:
*all backends = Postgres, Citus, BigQuery, SQL Server (exclude MySQL for now)
BasicCommon
pyteststest_select_query_author
test_select_query_author_quoted_col
test_select_query_author_with_skip_directive
test_select_query_author_with_include_directive
test_select_query_author_with_skip_include_directive
test_select_query_author_with_wrong_directive_err
test_select_query_where
test_nested_select_query_article_author
test_nested_select_query_deep
test_nested_select_query_where
test_nested_select_query_where_on_relationship
test_select_query_non_tracked_table
test_select_query_col_not_present_err
test_select_query_multiple_columns_arr_fkey
test_select_query_multiple_columns_obj_fkey
test_select_query_author_pk
test_select_query_author_pk_null
test_select_placeholder_err
I have done an initial analysis of the existing hspec test suite: https://gist.github.com/psibi/e3c266c62170cd13aa4724794cc66102
Based on the above gist, I'm summarizing things here. These are the haskell spec that has been implemented which are part of TestGraphQLQueryBasicCommon (from python):
The above haskell suite contains the implementation of the following yamls:
These are the additional tests that are not yet implemented from the TestGraphQLQueryBasicCommon:
We also need to ensure that the above test suite which has been already been implemented - is done for all the three backends of TestGraphQLQueryBasicCommon (right now that's not the case).
@psibi this list LGTM, thanks again for putting it together. For easier accounting next time, would you consider something like adding a code comment for each hspec referencing the pytest it's replacing? Or something more elegant if you can think of it. I think that'd make it easier to remove the corresponding pytests wholesale after this work is done.
@sassela I have a PR ready locally which does these things:
TestGraphQLBasicCommon
TestGraphQLBasicCommon
it
blocks referencing the equivalent pytest. (Note that this has been only done for the one in `TestGraphQLBasicCommon now). We should do it for the other ones too, probably in a separate PR.This PR is also implemented on top of the primitive MR which I have already created. I'm delaying opening it until that one is merged, so that the PR review is much easier. (But let me know if you want me to open it anyway).
@psibi thanks for the update! Please go ahead and open the tests PR and consider using https://github.com/hasura/graphql-engine-mono/pull/4263 as the base branch (rather than master
) for a clearer diff. The base branch should update automatically to master once the PR's merged.
In any case, I've approved the PR with the hspec primitives so that should be auto-merged soon.
Addressed at https://github.com/hasura/graphql-engine/commit/c9a5d51c70ed6b90ebde4021d77911dbcd95d17b, although there are some remaining BigQuery tests outstanding. @psibi mind creating a tracking issue for the BigQuery tests you're looking into?
@sassela Created here: https://github.com/hasura/graphql-engine/issues/8433 Thanks!
Implement the equivalent of
TestGraphQLQueryBasicCommon
(pytests are here) in the Haskell integration test suite.