-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: start a new file for cli plugins arguments tests
`TestRunGoodArgument` fits here. Signed-off-by: Ian Campbell <[email protected]>
- Loading branch information
Ian Campbell
committed
Mar 11, 2019
1 parent
fdb0ef7
commit 60a4806
Showing
2 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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!", | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters