From 51b8cd1e2be1924005da405a8e18b2b4230c8d66 Mon Sep 17 00:00:00 2001 From: Dimitris-Ilias Gkanatsios Date: Thu, 4 Aug 2022 17:50:16 +0300 Subject: [PATCH] fixing logs for e2e tests (#364) --- cmd/e2e/utilities_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/e2e/utilities_test.go b/cmd/e2e/utilities_test.go index 42e9b459..1ce8dcdc 100644 --- a/cmd/e2e/utilities_test.go +++ b/cmd/e2e/utilities_test.go @@ -487,8 +487,8 @@ func verifyPods(ctx context.Context, kubeClient client.Client, state buildState) var observedStates []string for _, pod := range pods.Items { s := fmt.Sprintf("%s:%s", pod.Name, pod.Status.Phase) - if pod.Status.Phase != corev1.PodRunning && len(pod.Status.ContainerStatuses) > 0 && pod.Status.ContainerStatuses[0].LastTerminationState.Terminated != nil { - s += fmt.Sprintf("-(Terminated.Reason: %s)", pod.Status.ContainerStatuses[0].LastTerminationState.Terminated.Reason) + if pod.Status.Phase != corev1.PodRunning && len(pod.Status.ContainerStatuses) > 0 && pod.Status.ContainerStatuses[0].State.Terminated != nil { + s += fmt.Sprintf("-(Terminated.Reason: %s)", pod.Status.ContainerStatuses[0].State.Terminated.Reason) } observedStates = append(observedStates, s) }