Add e2e test for kubectl run should generate deployment

This commit is contained in:
Janet Kuo
2016-02-02 14:51:15 -08:00
parent 311385e76c
commit 4e8b4871c4
2 changed files with 45 additions and 1 deletions

View File

@@ -160,6 +160,7 @@ func TestRunArgsFollowDashRules(t *testing.T) {
tf.ClientConfig = &client.Config{}
cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr)
cmd.Flags().Set("image", "nginx")
cmd.Flags().Set("generator", "run/v1")
err := Run(f, os.Stdin, os.Stdout, os.Stderr, cmd, test.args, test.argsLenAtDash)
if test.expectError && err == nil {
t.Errorf("unexpected non-error (%s)", test.name)