Skip to content

Commit

Permalink
ibmcloud: Logs for debugging nightly tests
Browse files Browse the repository at this point in the history
Included Logs for debugging nightly tests

Fixes: confidential-containers#1127

Signed-off-by: Sudharshan Muralidharan <[email protected]>
  • Loading branch information
sudharshanibm3 authored and liudalibj committed Aug 14, 2023
1 parent 63a002c commit 0af35b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/e2e/common_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ func (tc *testCase) run() {
t.Fatal(err)
}

if tc.podState == v1.PodRunning {
clientset, err := kubernetes.NewForConfig(client.RESTConfig())
if err != nil {
t.Fatal(err)
}
pod, err := clientset.CoreV1().Pods(tc.pod.Namespace).Get(ctx, tc.pod.Name, metav1.GetOptions{})
if err != nil {
t.Fatal(err)
}
//Included logs for debugging nightly tests
t.Logf("Expected Pod State: %v", tc.podState)
t.Logf("Current Pod State: %v", pod.Status.Phase)
}

}
return ctx
}).
Expand Down

0 comments on commit 0af35b7

Please sign in to comment.