-
Notifications
You must be signed in to change notification settings - Fork 44
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
test: Provide tests for client introspection query #1492
test: Provide tests for client introspection query #1492
Conversation
I think we can merge it if you change the expected behaviour to returning an error and add a comment saying that this should pass. |
853bb0e
to
143a4cf
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1492 +/- ##
===========================================
- Coverage 72.21% 72.18% -0.04%
===========================================
Files 185 185
Lines 18239 18239
===========================================
- Hits 13171 13165 -6
- Misses 4029 4033 +4
- Partials 1039 1041 +2 |
267bf6c
to
a2b841e
Compare
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.
Looks really good Orpheus, and should help encourage us to expand the schema/introspection tests. Added a few todos, but they are all very localized/small.
tests/integration/client_introspection/client_introspection_test.go
Outdated
Show resolved
Hide resolved
testUtils.ClientIntrospectionRequest{ | ||
Request: clientIntrospectionQuery, | ||
ExpectedError: "Unknown kind of type: ", | ||
// ExpectedError: "InputFields are missing", |
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.
todo: Please remove the commented out code (or document if it is there for a reason)
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.
please dont forget about this one :)
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.
good idea to have all the TODOs linked to an issue. IMO it should apply retroactively as well.
tests/integration/client_introspection/client_introspection_test.go
Outdated
Show resolved
Hide resolved
}, | ||
testUtils.ClientIntrospectionRequest{ | ||
Request: clientIntrospectionQuery, | ||
ExpectedError: "Unknown kind of type: ", |
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.
question: Do you know where/why/how this is erroring?
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.
Currently, I'm confused as to which part of the schema + introspection query this is coming from !
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.
okay no worries :)
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.
LGTM, please dont forget the last todo though before merge
## Relevant issue(s) Resolves sourcenetwork#1099 ## Description Provide test that is somewhat isomorphic to the way that clients validate the resulting introspection schema. I've found that the client introspection query is the same accross Altair, GraphiQL, and Postman clients. ## How has this been tested? Linux & CI
Relevant issue(s)
Resolves #1099
Description
Provide test that is somewhat isomorphic to the way that clients validate the resulting introspection schema.
I've found that the client introspection query is the same accross Altair, GraphiQL, and Postman clients.
Note that the test
TestClientIntrospectionWithOneToManySchema
fails because of issue #1463.Question: should it be fixed before this PR or should the test be disabled?
Feedback welcome!
Tasks
How has this been tested?
Linux & CI