diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 5679de8e2..2565f34dd 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -1,6 +1,7 @@ package main import ( + "errors" "fmt" "github.com/spf13/cobra" @@ -14,9 +15,11 @@ var initCmd = &cobra.Command{ Use: "init", Short: "Initialize Helm on both client and server.", Long: `Add long help here`, - Run: runInit, + RunE: RunInit, } -func runInit(cmd *cobra.Command, args []string) { +// RunInit initializes local config and installs tiller to Kubernetes Cluster +func RunInit(cmd *cobra.Command, args []string) error { fmt.Fprintln(stdout, "Init was called.") + return errors.New("NotImplemented") } diff --git a/cmd/helm/init_test.go b/cmd/helm/init_test.go new file mode 100644 index 000000000..333714ad0 --- /dev/null +++ b/cmd/helm/init_test.go @@ -0,0 +1,14 @@ +package main + +import ( + "testing" +) + +func TestRunInit(t *testing.T) { + + //TODO: call command and make sure no error is recevied + err := RunInit(initCmd, nil) + if err != nil { + t.Errorf("Expected no error but got one: %s", err) + } +}