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:
Ian Campbell 2019-03-01 14:50:57 +00:00
parent d6a230606c
commit 4e5f0af9cd
2 changed files with 19 additions and 12 deletions

View File

@ -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!",
})
}

View File

@ -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 // TestHelpGoodSubcommand ensures correct behaviour when invoking help on a
// valid plugin subcommand. A global argument is included to ensure it does not // valid plugin subcommand. A global argument is included to ensure it does not
// interfere. // interfere.