MCPcopy
hub / github.com/docker/compose / ComposeStandalonePath

Function ComposeStandalonePath

pkg/e2e/framework.go:393–402  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

391// This function will fail the test immediately if invoked when not running
392// in standalone test mode.
393func 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
405func StdoutContains(expected string) func(*icmd.Result) bool {

Callers 1

NewDockerComposeCmdMethod · 0.85

Calls 1

findExecutableFunction · 0.85

Tested by

no test coverage detected