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) unAction.cfg.Releases.Create(rel)
failer := unAction.cfg.KubeClient.(*kubefake.FailingKubeClient) failer := unAction.cfg.KubeClient.(*kubefake.FailingKubeClient)
failer.WaitError = fmt.Errorf("U timed out") failer.WaitForDeleteError = fmt.Errorf("U timed out")
unAction.cfg.KubeClient = failer unAction.cfg.KubeClient = failer
res, err := unAction.Run(rel.Name) res, err := unAction.Run(rel.Name)
is.Error(err) is.Error(err)

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

Loading…
Cancel
Save