mirror of https://github.com/helm/helm.git
feat(helm): add init cmd and test
This commit is contained in:
parent
fdede38769
commit
9281012d3c
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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…
Reference in New Issue