Skip to content

Commit

Permalink
debug2
Browse files Browse the repository at this point in the history
  • Loading branch information
lunarwhite committed Dec 19, 2024
1 parent 2431c18 commit 8f418f6
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -247,13 +247,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5*time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3*time.Minute).Should(Succeed())

By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -247,13 +247,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5*time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3*time.Minute).Should(Succeed())

By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -247,13 +247,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5*time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3*time.Minute).Should(Succeed())

By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}` + "`" + `, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -408,13 +408,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5 * time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3 * time.Minute).Should(Succeed())
By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/v4/plugin_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ func cmdOptsToCreateCurlPod(kbc *utils.TestContext, token string) []string {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, kbc.Kubectl.ServiceAccount),
"--",
Expand Down
7 changes: 4 additions & 3 deletions testdata/project-v4-multigroup/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -247,13 +247,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5*time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3*time.Minute).Should(Succeed())

By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down
7 changes: 4 additions & 3 deletions testdata/project-v4-with-plugins/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -247,13 +247,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5*time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3*time.Minute).Should(Succeed())

By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down
7 changes: 4 additions & 3 deletions testdata/project-v4/test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var _ = Describe("Manager", Ordered, func() {
}
}
}],
"serviceAccountName": "%s"
"serviceAccount": "%s"
}
}`, serviceAccountName),
"--", "/bin/sh", "-c", fmt.Sprintf(
Expand All @@ -247,13 +247,14 @@ var _ = Describe("Manager", Ordered, func() {
By("waiting for the curl-metrics pod to complete.")
verifyCurlUp := func(g Gomega) {
cmd := exec.Command("kubectl", "get", "pods", "curl-metrics",
"-o", "jsonpath={.status.phase}",
"-o=yaml",
"-n", namespace)
output, err := utils.Run(cmd)
fmt.Fprintf(GinkgoWriter, "curl-metrics output:\n %s", output)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(output).To(Equal("Succeeded"), "curl pod in wrong status")
}
Eventually(verifyCurlUp, 5*time.Minute).Should(Succeed())
Eventually(verifyCurlUp, 3*time.Minute).Should(Succeed())

By("getting the metrics by checking curl-metrics logs")
metricsOutput := getMetricsOutput()
Expand Down

0 comments on commit 8f418f6

Please sign in to comment.