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

Method RunCmd

pkg/e2e/framework.go:331–338  ·  pkg/e2e/framework.go::CLI.RunCmd

RunCmd runs a command, expects no error and returns a result

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

Source from the content-addressed store, hash-verified

329
330// RunCmd runs a command, expects no error and returns a result
331func (c *CLI) RunCmd(t testing.TB, args ...string) *icmd.Result {
332 t.Helper()
333 t.Logf("\t[%s] %s\n", t.Name(), strings.Join(args, " "))
334 assert.Assert(t, len(args) >= 1, "require at least one command in parameters")
335 res := icmd.RunCmd(c.NewCmd(args[0], args[1:]...))
336 res.Assert(t, icmd.Success)
337 return res
338}
339
340// RunCmdInDir runs a command in a given dir, expects no error and returns a result
341func (c *CLI) RunCmdInDir(t testing.TB, dir string, args ...string) *icmd.Result {

Callers 15

TestEnvPriorityFunction · 0.80
TestEnvInterpolationFunction · 0.80
doTestFunction · 0.80
TestPublishChecksFunction · 0.80
TestPublishFunction · 0.80
TestNestedDotEnvFunction · 0.80
TestLoggingDriverFunction · 0.80
TestConfigFromEnvFunction · 0.80

Calls 2

NewCmdMethod · 0.95
NameMethod · 0.45

Tested by 15

TestEnvPriorityFunction · 0.64
TestEnvInterpolationFunction · 0.64
doTestFunction · 0.64
TestPublishChecksFunction · 0.64
TestPublishFunction · 0.64
TestNestedDotEnvFunction · 0.64
TestLoggingDriverFunction · 0.64
TestConfigFromEnvFunction · 0.64