feat(helm): add init cmd and test

pull/613/head
Michelle Noorali 9 years ago
parent fdede38769
commit 9281012d3c

@ -1,6 +1,7 @@
package main package main
import ( import (
"errors"
"fmt" "fmt"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -14,9 +15,11 @@ var initCmd = &cobra.Command{
Use: "init", Use: "init",
Short: "Initialize Helm on both client and server.", Short: "Initialize Helm on both client and server.",
Long: `Add long help here`, 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.") fmt.Fprintln(stdout, "Init was called.")
return errors.New("NotImplemented")
} }

@ -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)
}
}
Loading…
Cancel
Save