package
23.1.1+incompatible
Repository: https://github.com/dgraph-io/dgraph.git
Documentation: pkg.go.dev
# README
This package contains test functions which are called by other packages. The intention of this package is to contain all the end to end tests which can be run with different configuration options like schema, encoding, http method etc.
# Functions
AssertGetGQLSchema queries the current GraphQL schema using getGQLSchema query and asserts that the query doesn't give any errors.
In addition to AssertGetGQLSchema, it also asserts that the response returned from the getGQLSchema query isn't nil and the Id in the response is actually a uid.
AssertSchemaUpdateCounterIncrement asserts that the schemaUpdateCounter is greater than the oldCounter, indicating that the GraphQL schema has been updated.
AssertUpdateGQLSchemaFailure tries to update the GraphQL schema and asserts that the update failed with all of the given errors.
AssertUpdateGQLSchemaSuccess updates the GraphQL schema, asserts that the update succeeded and the returned response is correct.
JSONEqGraphQL compares two JSON strings obtained from a /graphql response.
NewGraphQLSubscription returns graphql subscription client.
RetryUpdateGQLSchema tries to update the GraphQL schema and if it receives a retryable error, it keeps retrying until it either receives no error or a non-retryable error.
RunAll runs all the test functions in this package as sub tests.
RunGQLRequest runs a HTTP GraphQL request and returns the data or any errors.
SafelyDropAll can be used in tests for doing DROP_ALL when ACL is disabled.
SafelyDropAllWithGroot can be used in tests for doing DROP_ALL when ACL is enabled.
SafelyUpdateGQLSchema can be safely used in tests to update the GraphQL schema.
SafelyUpdateGQLSchemaOnAlpha1 is SafelyUpdateGQLSchema for alpha1 test container.
# Structs
GraphQLResponse GraphQL response structure.
GraphQLSubscriptionClient uses apollo subscription protocol to subscribe on GraphQL server.