From 068dc8a7994f88cbfd20420f84334ac52ebf204c Mon Sep 17 00:00:00 2001 From: Jim Ma Date: Tue, 3 Jan 2023 14:21:37 +0800 Subject: [PATCH] chore: print e2e exec output (#1963) Signed-off-by: Jim Ma --- test/e2e/e2e_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index cbbd2a64e..46ee49a69 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -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), "'")