const TestPGDump = "" /* 1234 byte string literal not displayed */
TestPGDump is a simple example pgdump file for a table containing a few cars
const TestPGDumpNewHeader = "" /* 1026 byte string literal not displayed */
TestPGDumpNewHeader has no rows, but has a new header
const TestPGDumpNewRows = "" /* 1221 byte string literal not displayed */
TestPGDumpNewRows is the same as TestPGDump, except that it has two new rows
AuthenticateWithSAMLResponse sends 'response' to Pachd's ACS, extracts the OTP from the response, converts it to a Pachyderm token, and automatically assigns it to the client 'c'
Cmd is a convenience function that replaces exec.Command. It's both shorter and it uses the current process's stderr as output for the command, which makes debugging failures much easier (i.e. you get an error message rather than "exit status 1")
DeletePachdPod deletes the pachd pod in a test cluster (restarting it, e.g. to retart the PPS master)
DeletePipelineRC deletes the RC belonging to the pipeline 'pipeline'. This can be used to test PPS's robustness
GetACSAddress takes a pachd address, assumed to be of the form
and converts it to
and returns that
GetKubeClient connects to the Kubernetes API server either from inside the cluster or from a test binary running on a machine with kubectl (it will connect to the same cluster as kubectl)
GetTestEnterpriseCode gets a Pachyderm Enterprise activation code from a private S3 bucket, and provides it to tests that use Pachyderm Enterprise features
MustMarshalEl marshals 'el' to byte, or fails the current test
MustMarshalXML marshals 'm' to byte, or fails the current test
MustParseURL marshals 'u' to a *url.URL, or fails the current test
PrettyPrintEl returns 'el' indented and marshalled to a string
UniquePort generates a likely unique port, so that multiple servers can run concurrently. Note that it does not actually check that the port is free, but uses atomics and a fairly highly port range to maximize the likelihood that the port is available.
UniqueString adds a UUID suffix to 'prefix'. This helps avoid name conflicts between tests that share the same Pachyderm cluster
MockServiceProviderProvider gives tests the opportunity to inject their own SAML service provider metadata into an ID provider
ConstServiceProviderProvider returns a ServiceProviderProvider that always returns 'md'
func (f MockServiceProviderProvider) GetServiceProvider(r *http.Request, serviceProviderID string) (*saml.EntityDescriptor, error)
GetServiceProvider implements the corresponding method in the ServiceProviderProvider interface for MockServiceProviderProvider
TestCmd aliases 'exec.Cmd' so that we can add func (c *TestCmd) Run(t *testing.T)
BashCmd is a convenience function that: 1. Performs a Go template substitution on 'cmd' using the strings in 'subs' 2. Returns a command that runs the result string from 1 as a Bash script
Run wraps (*exec.Cmd).Run(), though in the particular case that the command is run on Linux and fails with a SIGPIPE error (which often happens because TestCmd is created by BashCmd() above, which needs to set -o pipefail), this throws away the error. See "The Infamous SIGPIPE Signal" http://www.tldp.org/LDP/lpg/node20.html
TestIDP is a simple SAML ID provider for testing. It can generate SAML metadata (for configs) or SAMLResponses containing signed auth assertions and group memberships (for authentication)
NewTestIDP generates a new x509 cert and new test SAML ID provider
Metadata returns serialized IDP metadata for 't'
NewSAMLResponse generates a new signed SAMLResponse asserting that the bearer is 'subject' and is a member of the groups in 'groups'
The go get command cannot install this package because of the following issues: