From 529ad9029d202b6394369774dc4620f84f960e7d Mon Sep 17 00:00:00 2001 From: carlory Date: Fri, 1 Nov 2024 14:33:07 +0800 Subject: [PATCH] improve error message format for WaitForPodSuccessInNamespaceTimeout --- test/e2e/framework/pod/wait.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/pod/wait.go b/test/e2e/framework/pod/wait.go index 6d2cfe9865a..96f46fb8f36 100644 --- a/test/e2e/framework/pod/wait.go +++ b/test/e2e/framework/pod/wait.go @@ -475,7 +475,7 @@ func WaitForPodSuccessInNamespaceTimeout(ctx context.Context, c clientset.Interf ginkgo.By("Saw pod success") return true, nil case v1.PodFailed: - return true, gomega.StopTrying(fmt.Sprintf("pod %q failed with status: %+v", podName, pod.Status)) + return true, gomega.StopTrying(fmt.Sprintf("pod %q failed with status: \n%s", podName, format.Object(pod.Status, 1))) default: return false, nil }