Add test for unknown subcommand

Signed-off-by: Xiangxuan Liu <xiangxuan.liu@rightcapital.com>
Signed-off-by: Matheus Hunsche <matheus.hunsche@ifood.com.br>
pull/8840/head
Xiangxuan Liu 6 years ago committed by Matheus Hunsche
parent b361f02b93
commit 990d6cbe9c

@ -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