package
23.1.1+incompatible
Repository: https://github.com/dgraph-io/dgraph.git
Documentation: pkg.go.dev

# README

package z

This package is for code that is only used in tests (i.e. "*_test.go" files). It should not be used in non-test code because error handling is usually minimal and usually fatal.

# Packages

# Functions

Add JWKUrl and (VerificationKey, Algo) in the same Authorization JSON Adding Dummy values as this should result in validation error.
AssignUids talks to zero to assign the given number of uids.
checkHealthContainer checks health of container and determines wheather container is ready to accept request.
CheckSchema checks the names of the predicates and types in the schema against the given names.
CompareJSON compares two JSON objects (passed as strings).
CompareJSONMaps compares two JSON objects (passed as maps).
DgraphClient creates a Dgraph client.
DgraphClientDropAll creates a Dgraph client and drops all existing data.
DgraphClientWithCerts creates a Dgraph client with TLS configured using the given viper configuration.
DgraphClientWithGroot creates a Dgraph client with groot permissions set up.
DiffJSONMaps compares two JSON maps, optionally printing their differences, and returning true if they are equal.
MARKED FOR DEPRECATION: DockerCp copies from/to a container.
DockerCpFromContainer copies from a container.
DockerExec executes a command inside the given container.
DockerStart starts the specified services.
DropAll drops all the data in the Dgraph instance associated with the given client.
EqualJSON compares two JSON objects for equality.
Exec runs a single external command.
ExecWithOpts runs a single external command with the given options.
GetAccessJwt constructs an access jwt with the given user id, groupIds, namespace and expiration TTL.
GetClientToGroup returns a dgraph client connected to an alpha in the given group.
GetFullSchemaHTTPResponse returns a string representation of the HTTP response returned by the full schema{} query.
GetFullSchemaJSON returns a string representation of the JSON object returned by the full schema{} query.
GetPredicateNames returns the list of all the predicates stored in the restored pdir.
GetPredicateValues reads the specified p directory and returns the values for the given attribute in a map.
GetState queries the /state endpoint in zero and returns the response.
GetStateHttps queries the /state endpoint in zero and returns the response.
GetTypeNames returns the list of all the types stored in the restored pdir.
GrootHttpLogin logins using the groot account with the default password and returns the access JWT.
HttpLogin sends a HTTP request to the server and returns the access JWT and refresh JWT extracted from the HTTP response.
NewMinioClient returns a minio client.
Pipeline runs several commands such that the output of one command becomes the input of the next.
RetryBadQuery will retry a query until it failse with a non-retryable error.
RetryMutation will retry a mutation until it succeeds or a non-retryable error is received.
RetryQuery will retry a query until it succeeds or a non-retryable error is received.
SnipJSON snips the middle of a very long JSON string to make it less than 100 lines.
UnmarshalJSON unmarshals the given string into a map.
VerifyCurlCmd executes the curl command with the given arguments and verifies the result against the expected output.
VerifyQueryResponse executes the given query and verifies that the response of the query is same as the expected response.
VerifySchema verifies that the full schema generated using user provided predicates and types is same as the response of the schema{} query.

# Constants

# Variables

Instance is the instance name of the Alpha.
socket addr = IP address and port number.
KeyFile is set to the path of the file containing the key.
socket addr = IP address and port number.
These are exported so they can also be set directly from outside this package.
These are exported so they can also be set directly from outside this package.
These are exported so they can also be set directly from outside this package.
SockAddr is the address to the gRPC endpoint of the alpha used during tests.
SockAddrAlpha4 is the address to the gRPC endpoint of the alpha4 used during restore tests.
SockAddrAlpha4Http is the address to the HTTP of alpha4 used during restore tests.
SockAddrAlpha7 is the address to the gRPC endpoint of the alpha4 used during restore tests.
SockAddrAlpha7Http is the address to the HTTP of alpha7 used during restore tests.
SockAddrAlpha8 is the address to the gRPC endpoint of the alpha8 used during restore tests.
SockAddrAlpha8Http is the address to the HTTP of alpha8 used during restore tests.
SockAddrHttp is the address to the HTTP of alpha used during tests.
SockAddrZero is the address to the gRPC endpoint of the zero used during tests.
SockAddrZero4 is the address to the gRPC endpoint of the zero4 used during restore tests.
SockAddrZero4Http is the address to the HTTP endpoint of the zero4 used during restore tests.
SockAddrZero7 is the address to the gRPC endpoint of the zero7 used during restore tests.
SockAddrZero7Http is the address to the HTTP endpoint of the zero7 used during restore tests.
SockAddrZero8 is the address to the gRPC endpoint of the zero8 used during restore tests.
SockAddrZero8Http is the address to the HTTP endpoint of the zero8 used during restore tests.
SockAddrZeroHttp is the address to the HTTP endpoint of the zero used during tests.
Global test data directory used to store resources.

# Structs

CmdOpts sets the options to run a single command.
CurlFailureConfig stores information about the expected failure of a curl test.
LoginParams stores the information needed to perform a login request.
StateResponse represents the structure of the JSON object returned by calling the /state endpoint in zero.