Skip to content

Commit 0724a1d

Browse files
committed
1) Added successful namespace deletion in log 2) removed downstream ID tag
1 parent 39637f0 commit 0724a1d

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
@@ -3011,8 +3011,6 @@ func (f *Framework) AssertRuleIsPlatformType(ruleName, namespace string) error {
30113011
}
30123012

30133013
// waitForNamespaceDeletion waits until a namespace is fully deleted from the cluster
3014-
// This is used to verify that operator cleanup completes successfully without resources
3015-
// getting stuck in terminating state due to finalizers (OCP-54055)
30163014
func (f *Framework) waitForNamespaceDeletion(namespace string, retryInterval, timeout time.Duration) error {
30173015
err := wait.Poll(retryInterval, timeout, func() (bool, error) {
30183016
_, err := f.KubeClient.CoreV1().Namespaces().Get(context.TODO(), namespace, metav1.GetOptions{})
@@ -3021,17 +3019,16 @@ func (f *Framework) waitForNamespaceDeletion(namespace string, retryInterval, ti
30213019
return true, nil
30223020
}
30233021
if err != nil {
3024-
// Some other error occurred, retry
30253022
log.Printf("Error checking namespace %s deletion status: %v, retrying...", namespace, err)
30263023
return false, nil
30273024
}
3028-
// Namespace still exists, keep waiting
30293025
log.Printf("Waiting for namespace %s to be fully deleted...", namespace)
30303026
return false, nil
30313027
})
30323028

30333029
if err != nil {
30343030
return fmt.Errorf("namespace %s was not deleted within timeout: %w", namespace, err)
30353031
}
3032+
log.Printf("Namespace %s successfully deleted and cleaned up", namespace)
30363033
return nil
30373034
}

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)