Skip to content

Commit c90a6ef

Browse files
committed
1) Added successful namespace deletion in log 2) removed downstream ID tag
1 parent b25330d commit c90a6ef

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

tests/e2e/framework/common.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2888,8 +2888,6 @@ func (f *Framework) AssertRuleIsPlatformType(ruleName, namespace string) error {
28882888
}
28892889

28902890
// waitForNamespaceDeletion waits until a namespace is fully deleted from the cluster
2891-
// This is used to verify that operator cleanup completes successfully without resources
2892-
// getting stuck in terminating state due to finalizers (OCP-54055)
28932891
func (f *Framework) waitForNamespaceDeletion(namespace string, retryInterval, timeout time.Duration) error {
28942892
err := wait.Poll(retryInterval, timeout, func() (bool, error) {
28952893
_, err := f.KubeClient.CoreV1().Namespaces().Get(context.TODO(), namespace, metav1.GetOptions{})
@@ -2898,17 +2896,16 @@ func (f *Framework) waitForNamespaceDeletion(namespace string, retryInterval, ti
28982896
return true, nil
28992897
}
29002898
if err != nil {
2901-
// Some other error occurred, retry
29022899
log.Printf("Error checking namespace %s deletion status: %v, retrying...", namespace, err)
29032900
return false, nil
29042901
}
2905-
// Namespace still exists, keep waiting
29062902
log.Printf("Waiting for namespace %s to be fully deleted...", namespace)
29072903
return false, nil
29082904
})
29092905

29102906
if err != nil {
29112907
return fmt.Errorf("namespace %s was not deleted within timeout: %w", namespace, err)
29122908
}
2909+
log.Printf("Namespace %s successfully deleted and cleaned up", namespace)
29132910
return nil
29142911
}

tests/e2e/framework/main_entry.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ func (f *Framework) TearDown() error {
205205
return fmt.Errorf("failed to cleanup namespace %s: %w", f.OperatorNamespace, err)
206206
}
207207

208-
// Verify namespace deletion completes successfully (OCP-54055)
208+
// Verify namespace deletion completes successfully
209209
// This ensures that all resources, including those with finalizers, are properly cleaned up
210210
// and that the operator can be deleted without resources getting stuck in terminating state
211-
log.Printf("========== OCP-54055: Verifying namespace %s deletion completes successfully ==========\n", f.OperatorNamespace)
211+
log.Printf("Verifying namespace %s deletion \n", f.OperatorNamespace)
212212
err = f.waitForNamespaceDeletion(f.OperatorNamespace, time.Second*5, time.Minute*5)
213213
if err != nil {
214214
return fmt.Errorf("namespace %s deletion did not complete: %w", f.OperatorNamespace, err)
215215
}
216-
log.Printf("========== OCP-54055: Namespace %s successfully deleted - verification PASSED ==========\n", f.OperatorNamespace)
216+
log.Printf("Namespace %s successfully deleted\n", f.OperatorNamespace)
217217

218218
return nil
219219
}

0 commit comments

Comments
 (0)