e2e: fix logging as per new controller runtime

fixing logging as per new controller runtime
errors

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2024-05-15 09:05:40 +02:00 committed by mergify[bot]
parent 7fd2e8935b
commit 24112917ec
2 changed files with 5 additions and 5 deletions

View File

@ -297,12 +297,12 @@ func deletePVCAndValidatePV(c kubernetes.Interface, pvc *v1.PersistentVolumeClai
int(time.Since(start).Seconds())) int(time.Since(start).Seconds()))
pvc, err = c.CoreV1().PersistentVolumeClaims(nameSpace).Get(ctx, name, metav1.GetOptions{}) pvc, err = c.CoreV1().PersistentVolumeClaims(nameSpace).Get(ctx, name, metav1.GetOptions{})
if err == nil { if err == nil {
framework.Logf("PVC %s (status: %s) has not been deleted yet, rechecking...", name, pvc.Status) framework.Logf("PVC %s (status: %v) has not been deleted yet, rechecking...", name, pvc.Status)
return false, nil return false, nil
} }
if isRetryableAPIError(err) { if isRetryableAPIError(err) {
framework.Logf("failed to verify deletion of PVC %s (status: %s): %v", name, pvc.Status, err) framework.Logf("failed to verify deletion of PVC %s (status: %v): %v", name, pvc.Status, err)
return false, nil return false, nil
} }
@ -445,12 +445,12 @@ func waitForPVCToBeDeleted(c kubernetes.Interface, namespace, pvcName string, t
pvc.Status.String(), pvc.Status.String(),
int(time.Since(start).Seconds())) int(time.Since(start).Seconds()))
if err == nil { if err == nil {
framework.Logf("PVC %s (status: %s) has not been deleted yet, rechecking...", pvcName, pvc.Status) framework.Logf("PVC %s (status: %v) has not been deleted yet, rechecking...", pvcName, pvc.Status)
return false, nil return false, nil
} }
if isRetryableAPIError(err) { if isRetryableAPIError(err) {
framework.Logf("failed to verify deletion of PVC %s (status: %s): %v", pvcName, pvc.Status, err) framework.Logf("failed to verify deletion of PVC %s (status: %v): %v", pvcName, pvc.Status, err)
return false, nil return false, nil
} }

View File

@ -599,7 +599,7 @@ var _ = Describe("RBD", func() {
pvc.Name, pvc.Name,
metav1.DeleteOptions{}) metav1.DeleteOptions{})
if err != nil { if err != nil {
framework.Logf("failed to delete pvc: %w", err) framework.Logf("failed to delete pvc: %s", err)
} }
// Remove the claimRef to bind this PV to a new PVC. // Remove the claimRef to bind this PV to a new PVC.