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

Method NewDockerCmd

pkg/e2e/framework.go:313–321  ·  view source on GitHub ↗

NewDockerCmd creates a docker cmd without running it

(t testing.TB, args ...string)

Source from the content-addressed store, hash-verified

311
312// NewDockerCmd creates a docker cmd without running it
313func (c *CLI) NewDockerCmd(t testing.TB, args ...string) icmd.Cmd {
314 t.Helper()
315 for _, arg := range args {
316 if arg == compose.PluginName {
317 t.Fatal("This test called 'RunDockerCmd' for 'compose'. Please prefer 'RunDockerComposeCmd' to be able to test as a plugin and standalone")
318 }
319 }
320 return c.NewCmd(DockerExecutableName, args...)
321}
322
323// RunDockerOrExitError runs a docker command and returns a result
324func (c *CLI) RunDockerOrExitError(t testing.TB, args ...string) *icmd.Result {

Callers 1

RunDockerOrExitErrorMethod · 0.95

Calls 1

NewCmdMethod · 0.95

Tested by

no test coverage detected