chore: print e2e exec output (#1963)

Signed-off-by: Jim Ma <majinjing3@gmail.com>
This commit is contained in:
Jim Ma 2023-01-03 14:21:37 +08:00 committed by Gaius
parent dbb64f000a
commit 068dc8a799
No known key found for this signature in database
GPG Key ID: 8B4E5D1290FA2FFB
1 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ var _ = AfterSuite(func() {
out, err := e2eutil.KubeCtlCommand("-n", server.namespace, "get", "pod", "-l", fmt.Sprintf("component=%s", server.name),
"-o", fmt.Sprintf("jsonpath='{.items[%d].metadata.name}'", i)).CombinedOutput()
if err != nil {
fmt.Printf("get pod error: %s\n", err)
fmt.Printf("get pod error: %s, output: %s\n", err, string(out))
continue
}
podName := strings.Trim(string(out), "'")
@ -103,7 +103,7 @@ var _ = AfterSuite(func() {
countOut, err := e2eutil.KubeCtlCommand("-n", server.namespace, "get", "pod", "-l", fmt.Sprintf("component=%s", server.name),
"-o", fmt.Sprintf("jsonpath='{.items[%d].status.containerStatuses[0].restartCount}'", i)).CombinedOutput()
if err != nil {
fmt.Printf("get pod %s restart count error: %s\n", podName, err)
fmt.Printf("get pod %s restart count error: %s, output: %s\n", podName, err, string(countOut))
continue
}
rawCount := strings.Trim(string(countOut), "'")