Skip to content

Commit

Permalink
In helm 3, namespace flag is a global option flag so we can always in…
Browse files Browse the repository at this point in the history
…clude it (#947)
  • Loading branch information
yorinasub17 authored Jul 15, 2021
1 parent 1dcab2b commit 3c88557
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions modules/helm/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func RunHelmCommandAndGetStdOutE(t testing.TestingT, options *Options, cmd strin
func prepareHelmCommand(t testing.TestingT, options *Options, cmd string, additionalArgs ...string) shell.Command {
args := []string{cmd}
args = getCommonArgs(options, args...)
args = append(args, getNamespaceArgs(options)...)
args = append(args, additionalArgs...)

helmCmd := shell.Command{
Expand Down
1 change: 0 additions & 1 deletion modules/helm/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ func DeleteE(t testing.TestingT, options *Options, releaseName string, purge boo
args = append(args, deleteArgs...)
}
}
args = append(args, getNamespaceArgs(options)...)
args = append(args, releaseName)
_, err := RunHelmCommandAndGetOutputE(t, options, "delete", args...)
return err
Expand Down
1 change: 0 additions & 1 deletion modules/helm/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func InstallE(t testing.TestingT, options *Options, chart string, releaseName st
args = append(args, installArgs...)
}
}
args = append(args, getNamespaceArgs(options)...)
if options.Version != "" {
args = append(args, "--version", options.Version)
}
Expand Down
1 change: 0 additions & 1 deletion modules/helm/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func RollbackE(t testing.TestingT, options *Options, releaseName string, revisio
args = append(args, rollbackArgs...)
}
}
args = append(args, getNamespaceArgs(options)...)
args = append(args, releaseName)
if revision != "" {
args = append(args, revision)
Expand Down
1 change: 0 additions & 1 deletion modules/helm/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func UpgradeE(t testing.TestingT, options *Options, chart string, releaseName st
args = append(args, upgradeArgs...)
}
}
args = append(args, getNamespaceArgs(options)...)
args, err = getValuesArgsE(t, options, args...)
if err != nil {
return err
Expand Down

0 comments on commit 3c88557

Please sign in to comment.