MCPcopy Index your code
hub / github.com/docker/cli / TestRunGoodArgument

Function TestRunGoodArgument

e2e/cli-plugins/flags_test.go:12–21  ·  view source on GitHub ↗

TestRunGoodArgument ensures correct behaviour when running a valid plugin with an `--argument`.

(t *testing.T)

Source from the content-addressed store, hash-verified

10
11// TestRunGoodArgument ensures correct behaviour when running a valid plugin with an `--argument`.
12func TestRunGoodArgument(t *testing.T) {
13 run, _, cleanup := prepare(t)
14 defer cleanup()
15
16 res := icmd.RunCmd(run("helloworld", "--who", "Cleveland"))
17 res.Assert(t, icmd.Expected{
18 ExitCode: 0,
19 Out: "Hello Cleveland",
20 })
21}
22
23// TestClashWithGlobalArgs ensures correct behaviour when a plugin
24// has an argument with the same name as one of the globals.

Callers

nothing calls this directly

Calls 2

prepareFunction · 0.85
runFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…