Merge pull request #97137 from ii/update-logging-for-pod-lifecycle-test

Update Error logging for Pod+PodStatus resource lifecycle test
This commit is contained in:
Kubernetes Prow Robot 2020-12-14 15:42:11 -08:00 committed by GitHub
commit 868d185ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -939,10 +939,13 @@ var _ = framework.KubeDescribe("Pods", func() {
pod.Labels["test-pod-static"] == "true" && pod.Labels["test-pod-static"] == "true" &&
pod.Status.Phase == v1.PodRunning pod.Status.Phase == v1.PodRunning
if !found { if !found {
framework.Logf("observed Pod %v in namespace %v in phase %v conditions %v", pod.ObjectMeta.Name, pod.ObjectMeta.Namespace, pod.Status.Phase, pod.Status.Conditions) framework.Logf("observed Pod %v in namespace %v in phase %v with labels: %v & conditions %v", pod.ObjectMeta.Name, pod.ObjectMeta.Namespace, pod.Status.Phase, pod.Labels, pod.Status.Conditions)
return false, nil
} }
framework.Logf("Found Pod %v in namespace %v in phase %v with labels: %v & conditions %v", pod.ObjectMeta.Name, pod.ObjectMeta.Namespace, pod.Status.Phase, pod.Labels, pod.Status.Conditions)
return found, nil return found, nil
} }
framework.Logf("Observed event: %+v", event.Object)
return false, nil return false, nil
}) })
framework.ExpectNoError(err, "failed to see Pod %v in namespace %v running", testPod.ObjectMeta.Name, testNamespaceName) framework.ExpectNoError(err, "failed to see Pod %v in namespace %v running", testPod.ObjectMeta.Name, testNamespaceName)