Skip to content

Commit

Permalink
Merge pull request karmada-io#5457 from zhzhuang-zju/toppod
Browse files Browse the repository at this point in the history
Provide detailed error message when the  e2e test fails
  • Loading branch information
karmada-bot committed Aug 29, 2024
2 parents 10cc29a + a379359 commit 6b6a16d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/e2e/karmadactl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,8 @@ var _ = ginkgo.Describe("Karmadactl top testing", func() {
for _, clusterName := range framework.ClusterNames() {
cmd := framework.NewKarmadactlCommand(kubeconfig, karmadaContext, karmadactlPath, "", karmadactlTimeout, "top", "pod", podName, "-n", testNamespace, "-C", clusterName)
_, err := cmd.ExecOrDie()
gomega.Expect(strings.Contains(err.Error(), fmt.Sprintf("pods \"%s\" not found", podName))).To(gomega.BeTrue(), "should not found")
gomega.Expect(err).Should(gomega.HaveOccurred())
gomega.Expect(strings.Contains(err.Error(), fmt.Sprintf("pods \"%s\" not found", podName))).To(gomega.BeTrue(), "should not found", fmt.Sprintf("errMsg: %s", err.Error()))
}
})
})
Expand Down

0 comments on commit 6b6a16d

Please sign in to comment.