{"modulePath":"github.com/docker/compose-cli","version":"v1.0.35","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package e2e\n\n## Variables\n\n```go\nvar (\n\t// DockerExecutableName is the OS dependent Docker CLI binary name\n\tDockerExecutableName = \"docker\"\n)\n```\n\n## Functions\n\n```go\nfunc CopyFile(sourceFile string, destinationFile string) error\n```\nCopyFile copies a file from a sourceFile to a destinationFile setting permissions to 0755\n\n```go\nfunc GoldenFile(name string) string\n```\nGoldenFile golden file specific to platform\n\n```go\nfunc HTTPGetWithRetry(t *testing.T, endpoint string, expectedStatus int, retryDelay time.Duration, timeout time.Duration) string\n```\nHTTPGetWithRetry performs an HTTP GET on an \\`endpoint\\`, using retryDelay also as a request timeout. In the case of an error or the response status is not the expeted one, it retries the same request, returning the response body as a string (empty if we could not reach it)\n\n```go\nfunc Lines(output string) []string\n```\nLines split output into lines\n\n```go\nfunc SetupExistingCLI() (string, func(), error)\n```\nSetupExistingCLI copies the existing CLI in a temporary directory so that the new CLI can be configured to use it\n\n```go\nfunc StdoutContains(expected string) func(*icmd.Result) bool\n```\nStdoutContains returns a predicate on command result expecting a string in stdout\n\n## Types\n\n```go\ntype E2eCLI struct {\n\tBinDir    string\n\tConfigDir string\n\t// contains filtered or unexported fields\n}\n```\nE2eCLI is used to wrap the CLI for end to end testing nolint stutter\n\n```go\nfunc NewE2eCLI(t *testing.T, binDir string) *E2eCLI\n```\nNewE2eCLI returns a configured TestE2eCLI\n\n```go\nfunc NewParallelE2eCLI(t *testing.T, binDir string) *E2eCLI\n```\nNewParallelE2eCLI returns a configured TestE2eCLI with t.Parallel() set\n\n```go\nfunc (c *E2eCLI) MetricsSocket() string\n```\nMetricsSocket get the path where test metrics will be sent\n\n```go\nfunc (c *E2eCLI) NewCmd(command string, args ...string) icmd.Cmd\n```\nNewCmd creates a cmd object configured with the test environment set\n\n```go\nfunc (c *E2eCLI) NewDockerCmd(args ...string) icmd.Cmd\n```\nNewDockerCmd creates a docker cmd without running it\n\n```go\nfunc (c *E2eCLI) PathEnvVar() string\n```\nPathEnvVar returns path (os sensitive) for running test\n\n```go\nfunc (c *E2eCLI) RunCmd(args ...string) *icmd.Result\n```\nRunCmd runs a command, expects no error and returns a result\n\n```go\nfunc (c *E2eCLI) RunDockerCmd(args ...string) *icmd.Result\n```\nRunDockerCmd runs a docker command, expects no error and returns a result\n\n```go\nfunc (c *E2eCLI) RunDockerOrExitError(args ...string) *icmd.Result\n```\nRunDockerOrExitError runs a docker command and returns a result\n\n```go\nfunc (c *E2eCLI) WaitForCmdResult(command icmd.Cmd, predicate func(*icmd.Result) bool, timeout time.Duration, delay time.Duration)\n```\nWaitForCmdResult try to execute a cmd until resulting output matches given predicate\n\n```go\nfunc (c *E2eCLI) WaitForCondition(predicate func() (bool, string), timeout time.Duration, delay time.Duration)\n```\nWaitForCondition wait for predicate to execute to true\n\n```go\ntype MockMetricsServer struct {\n\t// contains filtered or unexported fields\n}\n```\nMockMetricsServer a mock registring all metrics POST invocations\n\n```go\nfunc NewMetricsServer(socket string) *MockMetricsServer\n```\nNewMetricsServer instaniate a new MockMetricsServer\n\n```go\nfunc (s *MockMetricsServer) GetUsage() []string\n```\nGetUsage get usage\n\n```go\nfunc (s *MockMetricsServer) ResetUsage()\n```\nResetUsage reset usage\n\n```go\nfunc (s *MockMetricsServer) Start()\n```\nStart start the mock server\n\n```go\nfunc (s *MockMetricsServer) Stop()\n```\nStop stop the mock server\n\n","path":"github.com/docker/compose-cli/utils/e2e","name":"e2e","synopsis":"","isRedistributable":true}
