diff --git a/cmd/helm/testdata/output/uninstall-multiple.txt b/cmd/helm/testdata/output/uninstall-multiple.txt new file mode 100644 index 000000000..ee1c67d2f --- /dev/null +++ b/cmd/helm/testdata/output/uninstall-multiple.txt @@ -0,0 +1,2 @@ +release "aeneas" uninstalled +release "aeneas2" uninstalled diff --git a/cmd/helm/uninstall.go b/cmd/helm/uninstall.go index 7d0bb09ff..1117465da 100644 --- a/cmd/helm/uninstall.go +++ b/cmd/helm/uninstall.go @@ -47,7 +47,7 @@ func newUninstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { for i := 0; i < len(args); i++ { - res, err := client.Run(args[0]) + res, err := client.Run(args[i]) if err != nil { return err } diff --git a/cmd/helm/uninstall_test.go b/cmd/helm/uninstall_test.go index 5ebb20ead..b31928e8f 100644 --- a/cmd/helm/uninstall_test.go +++ b/cmd/helm/uninstall_test.go @@ -30,6 +30,15 @@ func TestUninstall(t *testing.T) { golden: "output/uninstall.txt", rels: []*release.Release{release.Mock(&release.MockReleaseOptions{Name: "aeneas"})}, }, + { + name: "multiple uninstall", + cmd: "uninstall aeneas aeneas2", + golden: "output/uninstall-multiple.txt", + rels: []*release.Release{ + release.Mock(&release.MockReleaseOptions{Name: "aeneas"}), + release.Mock(&release.MockReleaseOptions{Name: "aeneas2"}), + }, + }, { name: "uninstall with timeout", cmd: "uninstall aeneas --timeout 120",