Skip to content

Commit

Permalink
test(e2e): wait for webhook endpoint readiness after deploying operator
Browse files Browse the repository at this point in the history
  • Loading branch information
basti1302 committed Sep 16, 2024
1 parent 5f513d5 commit 1799e97
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/e2e/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,21 @@ func verifyThatManagerPodIsRunning(operatorNamespace string) {
}

Eventually(verifyControllerUp, 120*time.Second, time.Second).Should(Succeed())

By("wait for webhook endpoint to become available")
Eventually(func(g Gomega) {
endpointsOutput, err := run(exec.Command(
"kubectl",
"get",
"endpoints",
"--namespace",
operatorNamespace,
"dash0-operator-webhook-service",
), false)
g.Expect(err).NotTo(HaveOccurred())
g.Expect(endpointsOutput).To(ContainSubstring("dash0-operator-webhook-service"))
g.Expect(endpointsOutput).To(ContainSubstring(":9443"))
}, 20*time.Second, 200*time.Millisecond).Should(Succeed())
}

func undeployOperator(operatorNamespace string) {
Expand Down

0 comments on commit 1799e97

Please sign in to comment.