ComposeStandalonePath returns the path to the locally-built Compose standalone binary from the repo. This function will fail the test immediately if invoked when not running in standalone test mode.
(t testing.TB)
| 391 | // This function will fail the test immediately if invoked when not running |
| 392 | // in standalone test mode. |
| 393 | func ComposeStandalonePath(t testing.TB) string { |
| 394 | t.Helper() |
| 395 | if !composeStandaloneMode { |
| 396 | t.Fatal("Not running in standalone mode") |
| 397 | } |
| 398 | composeBinary, err := findExecutable(DockerComposeExecutableName) |
| 399 | assert.NilError(t, err, "Could not find standalone Compose binary (%q)", |
| 400 | DockerComposeExecutableName) |
| 401 | return composeBinary |
| 402 | } |
| 403 | |
| 404 | // StdoutContains returns a predicate on command result expecting a string in stdout |
| 405 | func StdoutContains(expected string) func(*icmd.Result) bool { |
no test coverage detected