Non-DI approach to the exec.Command mocking

This commit is contained in:
Erin Call
2019-12-05 09:57:59 -08:00
parent 990d1856d8
commit e77f6842b9
3 changed files with 15 additions and 9 deletions

View File

@@ -5,13 +5,9 @@ import ()
const HELM_BIN = "/usr/bin/helm"
func Install(args ...string) error {
cmd := &execCmd{}
cmd := Command()
cmd.Path(HELM_BIN)
return install(cmd, args)
}
func install(cmd cmd, args []string) error {
args = append([]string{"install"}, args...)
cmd.Args(args)