Commit 9281012d authored by Michelle Noorali's avatar Michelle Noorali

feat(helm): add init cmd and test

parent fdede387
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")
}
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)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment