diff --git a/Makefile b/Makefile index dbe8e0334..2070fd4d0 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,8 @@ test: test-unit .PHONY: test-unit test-unit: + @echo + @echo "==> Running unit tests <==" HELM_HOME=/no/such/dir $(GO) test $(GOFLAGS) -run $(TESTS) $(PKG) $(TESTFLAGS) .PHONY: test-style diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 9a6a77cbb..b1cd04140 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -53,7 +53,7 @@ func newCompletionCmd(out io.Writer) *cobra.Command { Short: "Generate autocompletions script for the specified shell (bash or zsh)", Long: completionDesc, RunE: func(cmd *cobra.Command, args []string) error { - return RunCompletion(out, cmd, args) + return runCompletion(out, cmd, args) }, ValidArgs: shells, } @@ -61,16 +61,16 @@ func newCompletionCmd(out io.Writer) *cobra.Command { return cmd } -func RunCompletion(out io.Writer, cmd *cobra.Command, args []string) error { +func runCompletion(out io.Writer, cmd *cobra.Command, args []string) error { if len(args) == 0 { - return fmt.Errorf("Shell not specified.") + return fmt.Errorf("shell not specified") } if len(args) > 1 { - return fmt.Errorf("Too many arguments. Expected only the shell type.") + return fmt.Errorf("too many arguments, expected only the shell type") } run, found := completionShells[args[0]] if !found { - return fmt.Errorf("Unsupported shell type %q.", args[0]) + return fmt.Errorf("unsupported shell type %q", args[0]) } return run(out, cmd) diff --git a/cmd/helm/fetch.go b/cmd/helm/fetch.go index 899fd1e73..52f534c09 100644 --- a/cmd/helm/fetch.go +++ b/cmd/helm/fetch.go @@ -73,7 +73,7 @@ func newFetchCmd(out io.Writer) *cobra.Command { Long: fetchDesc, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { - return fmt.Errorf("This command needs at least one argument, url or repo/name of the chart.") + return fmt.Errorf("need at least one argument, url or repo/name of the chart") } for i := 0; i < len(args); i++ { fch.chartRef = args[i] diff --git a/cmd/helm/package.go b/cmd/helm/package.go index 8b4e12e55..a558c40f0 100644 --- a/cmd/helm/package.go +++ b/cmd/helm/package.go @@ -72,7 +72,7 @@ func newPackageCmd(out io.Writer) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { pkg.home = settings.Home if len(args) == 0 { - return fmt.Errorf("This command needs at least one argument, the path to the chart.") + return fmt.Errorf("need at least one argument, the path to the chart") } if pkg.sign { if pkg.key == "" { diff --git a/cmd/helm/package_test.go b/cmd/helm/package_test.go index 683858cd8..2a0f6d9f5 100644 --- a/cmd/helm/package_test.go +++ b/cmd/helm/package_test.go @@ -64,7 +64,7 @@ func TestPackage(t *testing.T) { name: "package without chart path", args: []string{}, flags: map[string]string{}, - expect: "This command needs at least one argument, the path to the chart.", + expect: "need at least one argument, the path to the chart", err: true, }, { diff --git a/cmd/helm/repo_add.go b/cmd/helm/repo_add.go index 314a31ae2..1bdbfddb1 100644 --- a/cmd/helm/repo_add.go +++ b/cmd/helm/repo_add.go @@ -85,7 +85,7 @@ func addRepository(name, url string, home helmpath.Home, certFile, keyFile, caFi } if noUpdate && f.Has(name) { - return fmt.Errorf("The repository name you provided (%s) already exists. Please specify a different name.", name) + return fmt.Errorf("repository name (%s) already exists, please specify a different name", name) } cif := home.CacheIndex(name) diff --git a/cmd/helm/reset.go b/cmd/helm/reset.go index c37e3d687..b1efe35ed 100644 --- a/cmd/helm/reset.go +++ b/cmd/helm/reset.go @@ -96,7 +96,7 @@ func (d *resetCmd) run() error { } if len(res.Releases) > 0 && !d.force { - return fmt.Errorf("There are still %d deployed releases (Tip: use --force).", len(res.Releases)) + return fmt.Errorf("there are still %d deployed releases (Tip: use --force)", len(res.Releases)) } if err := installer.Uninstall(d.kubeClient, &installer.Options{Namespace: d.namespace}); err != nil { diff --git a/cmd/helm/reset_test.go b/cmd/helm/reset_test.go index 855b4c5bd..5df8f2234 100644 --- a/cmd/helm/reset_test.go +++ b/cmd/helm/reset_test.go @@ -120,7 +120,7 @@ func TestReset_deployedReleases(t *testing.T) { namespace: api.NamespaceDefault, } err = cmd.run() - expected := "There are still 1 deployed releases (Tip: use --force)" + expected := "there are still 1 deployed releases (Tip: use --force)" if !strings.Contains(err.Error(), expected) { t.Errorf("unexpected error: %v", err) } diff --git a/cmd/rudder/rudder.go b/cmd/rudder/rudder.go index 0a5a97bff..365c404a9 100644 --- a/cmd/rudder/rudder.go +++ b/cmd/rudder/rudder.go @@ -126,6 +126,7 @@ func (r *ReleaseModuleServiceServer) UpgradeRelease(ctx context.Context, in *rud return &rudderAPI.UpgradeReleaseResponse{}, err } +// ReleaseStatus retrieves release status func (r *ReleaseModuleServiceServer) ReleaseStatus(ctx context.Context, in *rudderAPI.ReleaseStatusRequest) (*rudderAPI.ReleaseStatusResponse, error) { grpclog.Print("status") diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 508122376..aea489edf 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -572,5 +572,5 @@ func tarFromLocalDir(chartpath string, name string, repo string, version string) return ch.Metadata.Version, err } - return "", fmt.Errorf("Can't get a valid version for dependency %s.", name) + return "", fmt.Errorf("can't get a valid version for dependency %s", name) } diff --git a/pkg/releasetesting/environment_test.go b/pkg/releasetesting/environment_test.go index deb8617f6..311541104 100644 --- a/pkg/releasetesting/environment_test.go +++ b/pkg/releasetesting/environment_test.go @@ -123,7 +123,7 @@ func newGetFailingKubeClient() *getFailingKubeClient { } func (p *getFailingKubeClient) Get(ns string, r io.Reader) (string, error) { - return "", errors.New("In the end, they did not find Nemo.") + return "", errors.New("in the end, they did not find Nemo") } type deleteFailingKubeClient struct {