# Packages
Package unit performs initialization and validation for unit tests.
# Functions
AssertJSON verifies that the expect json string matches the actual.
AssertQuery verifies the expect HTTP query string matches the actual.
AssertURL verifies the expected URL is matches the actual.
AssertXML verifies that the expect xml string matches the actual.
CleanupTLSBundleFiles takes variadic list of files to be deleted.
CreateClientTLSCertFiles returns a set of temporary files for the client certificate and key files.
CreateTLSBundleFiles returns the temporary filenames for the certificate key, and CA PEM content.
CreateTLSServer will create the TLS server on an open port using the certificate and key.
DidPanic returns if the function paniced and returns true if the function paniced.
Match is a testing helper to test for testing error by comparing expected with a regular expression.
NewTLSClientCertServer creates a new HTTP test server initialize to require HTTP clients authenticate with TLS client certificates.
ParseSigV4Signature deconstructs a sigv4 or sigv4a signature from a set of request headers.
PopEnv takes the list of the environment values and injects them into the process's environment variable data.
SprintExpectActual returns a string for test failure cases when the actual value is not the same as the expected.
StashEnv stashes the current environment variables except variables listed in envToKeepx Returns an function to pop out old environment.
# Variables
ClientTLSCert is the Client PEM.
ClientTLSKey is the Client private key PEM.
TLSBundleCA is the CA PEM.
TLSBundleCert is the Server PEM.
TLSBundleKey is the Server private key PEM.
# Structs
DiscardAt is an io.WriteAt that discards the requested bytes to be written.
EndlessReader is an io.Reader that will always return that bytes have been read.
A FakeContext provides a simple stub implementation of a Context.
MockCredentialsProvider is a type that can be used to mock out credentials providers.
ReadCloser is a io.ReadCloser for unit testing.
SigV4Signature represents a parsed sigv4 or sigv4a signature.
ZeroReader is a io.Reader which will always write zeros to the byte slice provided.