Merge pull request #121888 from SD-13/e2e-gomega-be-true-or-false

Enhance boolean assertions when fail
This commit is contained in:
Kubernetes Prow Robot
2024-08-20 04:24:42 -07:00
committed by GitHub
35 changed files with 135 additions and 161 deletions

View File

@@ -381,7 +381,7 @@ func runPodAndWaitUntilScheduled(f *framework.Framework, pod *v1.Pod) *v1.Pod {
isReady, err := testutils.PodRunningReady(pod)
framework.ExpectNoError(err)
gomega.ExpectWithOffset(1, isReady).To(gomega.BeTrueBecause("pod should be ready"))
gomega.ExpectWithOffset(1, isReady).To(gomega.BeTrueBecause("pod %+v was expected to be ready", pod))
return pod
}