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 <moser.sts@gmail.com>
pull/9180/head
Stephane Moser 3 years ago
parent c62ce12bed
commit 4bc901c95f

@ -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()
}()

@ -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()
}()

@ -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
}

Loading…
Cancel
Save