Skip to content

Commit

Permalink
test fix output
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Sep 11, 2024
1 parent 594ce4f commit d36c888
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err:= utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())
Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v4-multigroup/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v4-with-plugins/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v4/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the metrics endpoint to be ready")
verifyMetricsEndpointReady := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "endpoints", metricsServiceName, "-n", namespace)
g.Expect(utils.Run(cmd)).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
output, err := utils.Run(cmd)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(ContainSubstring("8443"), "Metrics endpoint is not ready")
}
Eventually(verifyMetricsEndpointReady).Should(Succeed())

Expand Down

0 comments on commit d36c888

Please sign in to comment.