Skip to content

Commit

Permalink
fix: handle redundant deletion of Namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Kumar Mallikarjuna <[email protected]>
  • Loading branch information
kumar-mallikarjuna committed Sep 18, 2024
1 parent c8c8342 commit e49a72b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/test/case.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ func (t *Case) DeleteNamespace(cl client.Client, ns *namespace) error {
},
}

if err := cl.Delete(ctx, nsObj); err != nil {
if err := cl.Delete(ctx, nsObj); k8serrors.IsNotFound(err) {
t.Logger.Logf("Namespace already cleaned up")
} else if err != nil {
return err
}

Expand Down

0 comments on commit e49a72b

Please sign in to comment.