mirror of https://github.com/docker/cli.git
e2e: start a new file for cli plugins arguments tests
`TestRunGoodArgument` fits here. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
d6a230606c
commit
4e5f0af9cd
|
@ -0,0 +1,19 @@
|
|||
package cliplugins
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gotest.tools/icmd"
|
||||
)
|
||||
|
||||
// TestRunGoodArgument ensures correct behaviour when running a valid plugin with an `--argument`.
|
||||
func TestRunGoodArgument(t *testing.T) {
|
||||
run, _, cleanup := prepare(t)
|
||||
defer cleanup()
|
||||
|
||||
res := icmd.RunCmd(run("helloworld", "--who", "Cleveland"))
|
||||
res.Assert(t, icmd.Expected{
|
||||
ExitCode: 0,
|
||||
Out: "Hello Cleveland!",
|
||||
})
|
||||
}
|
|
@ -144,18 +144,6 @@ func TestRunGoodSubcommand(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
// TestRunGoodArgument ensures correct behaviour when running a valid plugin with an `--argument`.
|
||||
func TestRunGoodArgument(t *testing.T) {
|
||||
run, _, cleanup := prepare(t)
|
||||
defer cleanup()
|
||||
|
||||
res := icmd.RunCmd(run("helloworld", "--who", "Cleveland"))
|
||||
res.Assert(t, icmd.Expected{
|
||||
ExitCode: 0,
|
||||
Out: "Hello Cleveland!",
|
||||
})
|
||||
}
|
||||
|
||||
// TestHelpGoodSubcommand ensures correct behaviour when invoking help on a
|
||||
// valid plugin subcommand. A global argument is included to ensure it does not
|
||||
// interfere.
|
||||
|
|
Loading…
Reference in New Issue