Non-DI approach to the exec.Command mocking
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user