Skip to content
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

chore(test): Refactor GraphQL tests to use best practices (GRAPHQL-885) #7016

Merged
merged 9 commits into from
Dec 2, 2020

Conversation

abhimanyusinghgaur
Copy link
Contributor

@abhimanyusinghgaur abhimanyusinghgaur commented Nov 30, 2020

This PR does the following things:

  • adds a counter in /probe/graphql response which indicate how many time the GraphQL schema has been updated.
  • adds some common test methods to update the GQL schema which ensure schema update using the counter.
  • Refactors existing tests to use those methods in order to update the GQL schema.
  • adds the best practice of using common.RequireNoGQLErrors instead of require.Nil for verifying that the GraphQLResponse has no errors.
  • enables some skipped tests in graphql/e2e/admin_auth.

With this PR, all the flakiness around GraphQL schema updates should no longer be there.


This change is Reviewable

@github-actions github-actions bot added the area/graphql Issues related to GraphQL support on Dgraph. label Nov 30, 2020
@netlify
Copy link

netlify bot commented Nov 30, 2020

Deploy preview for dgraph-docs ready!

Built with commit 04279d9

https://deploy-preview-7016--dgraph-docs.netlify.app

@abhimanyusinghgaur abhimanyusinghgaur changed the title chore(test): Refactor GraphQL tests to use best practices chore(test): Refactor GraphQL tests to use best practices (GRAPHQL-885) Nov 30, 2020
Copy link
Contributor

@aman-bansal aman-bansal left a comment

Choose a reason for hiding this comment

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

Reviewed 20 of 21 files at r1, 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @manishrjain, @MichaelJCompton, @pawanrawal, and @vvbalaji-dgraph)

@abhimanyusinghgaur abhimanyusinghgaur merged commit 7c077e5 into master Dec 2, 2020
@abhimanyusinghgaur abhimanyusinghgaur deleted the abhimanyu/schema-counter branch December 2, 2020 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/graphql Issues related to GraphQL support on Dgraph.
Development

Successfully merging this pull request may close these issues.

2 participants