From 4bc901c95f3589b6d6b4b3bc0843347334cd0f68 Mon Sep 17 00:00:00 2001 From: Stephane Moser Date: Fri, 6 Aug 2021 17:54:00 +0100 Subject: [PATCH] Resolve PR comments Fix typos Remove condition arround time.Sleep Because a negative or zero duration causes Sleep to return immediately. Signed-off-by: Stephane Moser --- cmd/helm/install.go | 2 +- cmd/helm/upgrade.go | 2 +- pkg/kube/fake/fake.go | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/helm/install.go b/cmd/helm/install.go index f72c3d388..00bae1373 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -254,7 +254,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options signal.Notify(cSignal, os.Interrupt, syscall.SIGTERM) go func() { <-cSignal - fmt.Fprintf(out, "Release %s has been cancel.\n", args[0]) + fmt.Fprintf(out, "Release %s has been cancelled.\n", args[0]) cancel() }() diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 862b6e341..28f8f9b3e 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -187,7 +187,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { signal.Notify(cSignal, os.Interrupt, syscall.SIGTERM) go func() { <-cSignal - fmt.Fprintf(out, "Release %s has been cancel.\n", args[0]) + fmt.Fprintf(out, "Release %s has been cancelled.\n", args[0]) cancel() }() diff --git a/pkg/kube/fake/fake.go b/pkg/kube/fake/fake.go index 1aa390511..00d88f75b 100644 --- a/pkg/kube/fake/fake.go +++ b/pkg/kube/fake/fake.go @@ -53,9 +53,7 @@ func (f *FailingKubeClient) Create(resources kube.ResourceList) (*kube.Result, e // Waits the amount of time defined on f.WaitDuration, then returns the configured error if set or prints. func (f *FailingKubeClient) Wait(resources kube.ResourceList, d time.Duration) error { - if f.WaitDuration != 0 { - time.Sleep(f.WaitDuration) - } + time.Sleep(f.WaitDuration) if f.WaitError != nil { return f.WaitError }