test: print merge commit (#581)
* test: printf merge commit Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
4185dd428c
commit
4963da47aa
|
|
@ -30,20 +30,19 @@ var _ = BeforeSuite(func() {
|
||||||
out, err := e2eutil.GitCommand("rev-parse", "--short", "HEAD").CombinedOutput()
|
out, err := e2eutil.GitCommand("rev-parse", "--short", "HEAD").CombinedOutput()
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
gitCommit := strings.Fields(string(out))[0]
|
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",
|
out, err = e2eutil.KubeCtlCommand("-n", dragonflyNamespace, "get", "pod", "-l", "component=dfdaemon",
|
||||||
"-o", "jsonpath='{range .items[*]}{.metadata.name}{end}'").CombinedOutput()
|
"-o", "jsonpath='{range .items[*]}{.metadata.name}{end}'").CombinedOutput()
|
||||||
podName := strings.Trim(string(out), "'")
|
podName := strings.Trim(string(out), "'")
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
fmt.Println(podName)
|
|
||||||
|
|
||||||
Expect(strings.HasPrefix(podName, "dragonfly-dfdaemon-")).Should(BeTrue())
|
Expect(strings.HasPrefix(podName, "dragonfly-dfdaemon-")).Should(BeTrue())
|
||||||
pod := e2eutil.NewPodExec(dragonflyNamespace, podName, "dfdaemon")
|
pod := e2eutil.NewPodExec(dragonflyNamespace, podName, "dfdaemon")
|
||||||
out, err = pod.Command("dfget", "version").CombinedOutput()
|
out, err = pod.Command("dfget", "version").CombinedOutput()
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
dfgetGitCommit := strings.Fields(string(out))[7]
|
dfgetGitCommit := strings.Fields(string(out))[7]
|
||||||
fmt.Println(dfgetGitCommit)
|
fmt.Printf("dfget merge commit: %s\n", gitCommit)
|
||||||
|
|
||||||
Expect(gitCommit).To(Equal(dfgetGitCommit))
|
Expect(gitCommit).To(Equal(dfgetGitCommit))
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue