mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
Fix discovery test cleanup to wait for delete convergence
This commit is contained in:
@@ -141,7 +141,7 @@ func (a applyAPIService) Cleanup(ctx context.Context, client testClient) error {
|
||||
name := a.Version + "." + a.Group
|
||||
err := client.ApiregistrationV1().APIServices().Delete(ctx, name, metav1.DeleteOptions{})
|
||||
|
||||
if !errors.IsNotFound(err) {
|
||||
if err != nil && !errors.IsNotFound(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ func (a applyCRD) Cleanup(ctx context.Context, client testClient) error {
|
||||
name := a.Names.Plural + "." + a.Group
|
||||
err := client.ApiextensionsV1().CustomResourceDefinitions().Delete(ctx, name, metav1.DeleteOptions{})
|
||||
|
||||
if !errors.IsNotFound(err) {
|
||||
if err != nil && !errors.IsNotFound(err) {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user