Skip to content

Commit

Permalink
fixing logs for e2e tests (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgkanatsios authored Aug 4, 2022
1 parent e656c50 commit 51b8cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/e2e/utilities_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 51b8cd1

Please sign in to comment.