tests: migration: make flaky test more verbose
@@ -3090,7 +3090,7 @@ var _ = Describe("[rfe_id:393][crit:high][vendor:cnv-qe@redhat.com][level:system
By("Verifying at least once that both pods are protected")
for _, pod := range pods.Items {
err := virtClient.CoreV1().Pods(vmi.Namespace).EvictV1beta1(context.Background(), &policyv1beta1.Eviction{ObjectMeta: metav1.ObjectMeta{Name: pod.Name}})
- Expect(errors.IsTooManyRequests(err)).To(BeTrue())
+ Expect(errors.IsTooManyRequests(err)).To(BeTrue(), "expected TooManyRequests error, got: %v", err)
}
By("Verifying that both pods are protected by the PodDisruptionBudget for the whole migration")
getOptions := metav1.GetOptions{}
@@ -3107,8 +3107,7 @@ var _ = Describe("[rfe_id:393][crit:high][vendor:cnv-qe@redhat.com][level:system
deleteOptions := &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{ResourceVersion: &pod.ResourceVersion}}
eviction := &policyv1beta1.Eviction{ObjectMeta: metav1.ObjectMeta{Name: pod.Name}, DeleteOptions: deleteOptions}
err = virtClient.CoreV1().Pods(vmi.Namespace).EvictV1beta1(context.Background(), eviction)
- Expect(errors.IsTooManyRequests(err)).To(BeTrue())
-
+ Expect(errors.IsTooManyRequests(err)).To(BeTrue(), "expected TooManyRequests error, got: %v", err)
}
return currentMigration.Status.Phase
}, 180*time.Second, 500*time.Millisecond).Should(Equal(v1.MigrationSucceeded))
