wait for delete

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
pull/13604/head
Austin Abro 7 months ago
parent 7fde4962a8
commit 5d12255497
No known key found for this signature in database
GPG Key ID: 92EB5159E403F9D6

@ -100,7 +100,7 @@ func TestUninstallRelease_Wait(t *testing.T) {
}`
unAction.cfg.Releases.Create(rel)
failer := unAction.cfg.KubeClient.(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("U timed out")
failer.WaitForDeleteError = fmt.Errorf("U timed out")
unAction.cfg.KubeClient = failer
res, err := unAction.Run(rel.Name)
is.Error(err)

@ -36,6 +36,7 @@ type FailingKubeClient struct {
CreateError error
GetError error
WaitError error
WaitForDeleteError error
DeleteError error
DeleteWithPropagationError error
WatchUntilReadyError error
@ -82,8 +83,8 @@ func (f *FailingKubeClient) WaitWithJobs(resources kube.ResourceList, d time.Dur
// WaitForDelete returns the configured error if set or prints
func (f *FailingKubeClient) WaitForDelete(resources kube.ResourceList, d time.Duration) error {
if f.WaitError != nil {
return f.WaitError
if f.WaitForDeleteError != nil {
return f.WaitForDeleteError
}
return f.PrintingKubeClient.WaitForDelete(resources, d)
}

Loading…
Cancel
Save