# 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.
# Functions
AssignUids talks to zero to assign the given number of uids.
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.
DockerCp copies from/to a container.
DockerExec executes a command inside the given container.
DockerPause pauses the specified services.
DockerStart starts the specified services.
DockerStop stops the specified services.
DockerUnpause unpauses 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.
GetClientToGroup returns a dgraph client connected to an alpha in the given group.
GetPValues 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.
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.
RepoPath converts a path relative to the root of the repo into an absolute path.
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.
# Variables
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.
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.
SockAddrZeroHttp is the address to the HTTP endpoint of the zero used during tests.
# 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.