Merge pull request #128484 from carlory/improve-error

improve error message format for WaitForPodSuccessInNamespaceTimeout
This commit is contained in:
Kubernetes Prow Robot
2024-11-03 02:19:27 +00:00
committed by GitHub

View File

@@ -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
}