From 4963da47aa36a19d506fbcdeb5b1b5c72566ee3c Mon Sep 17 00:00:00 2001 From: Gaius Date: Thu, 26 Aug 2021 10:38:57 +0800 Subject: [PATCH] test: print merge commit (#581) * test: printf merge commit Signed-off-by: Gaius --- test/e2e/e2e_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 41429935d..33f6b51d8 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -30,20 +30,19 @@ var _ = BeforeSuite(func() { out, err := e2eutil.GitCommand("rev-parse", "--short", "HEAD").CombinedOutput() Expect(err).NotTo(HaveOccurred()) gitCommit := strings.Fields(string(out))[0] - fmt.Println(gitCommit) + fmt.Printf("git merge commit: %s\n", gitCommit) out, err = e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", "component=dfdaemon", "-o", "jsonpath='{range .items[*]}{.metadata.name}{end}'").CombinedOutput() podName := strings.Trim(string(out), "'") Expect(err).NotTo(HaveOccurred()) - fmt.Println(podName) Expect(strings.HasPrefix(podName, "dragonfly-dfdaemon-")).Should(BeTrue()) pod := e2eutil.NewPodExec(dragonflyNamespace, podName, "dfdaemon") out, err = pod.Command("dfget", "version").CombinedOutput() Expect(err).NotTo(HaveOccurred()) dfgetGitCommit := strings.Fields(string(out))[7] - fmt.Println(dfgetGitCommit) + fmt.Printf("dfget merge commit: %s\n", gitCommit) Expect(gitCommit).To(Equal(dfgetGitCommit)) })