Add test for unknown subcommand

Signed-off-by: Xiangxuan Liu <xiangxuan.liu@rightcapital.com>
(cherry picked from commit d5a2963cc9)
release-3.1
Xiangxuan Liu 6 years ago committed by Matt Farina
parent 0dda0ad102
commit 499a2068fb
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -95,3 +95,11 @@ func TestRootCmd(t *testing.T) {
})
}
}
func TestUnknownSubCmd(t *testing.T) {
_, _, err := executeActionCommand("foobar")
if err == nil || err.Error() != `unknown command "foobar" for "helm"` {
t.Errorf("Expect unknown command error, got %q", err)
}
}

Loading…
Cancel
Save