Skip to content

Commit 69afeb9

Browse files
stubbiclaude
andcommitted
ci(e2e): wait for operator webhook endpoint backend before running tests
After helm --wait the operator pod is Ready, but the webhook server may not yet have certs mounted / port bound. The first kubectl apply hits the mutating webhook and fails with "connection refused". Block in BeforeSuite until the hermes-operator-webhook Service has at least one Ready Endpoint backend before installing MinIO + running tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 162ddc4 commit 69afeb9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/e2e/e2e_suite_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ var _ = BeforeSuite(func() {
3333
logs, _ := kubectl("logs", "-l", "app.kubernetes.io/name=hermes-operator", "-n", "hermes-system", "--all-containers=true", "--tail=200")
3434
Fail("helm upgrade failed: " + out + "\n\n--- deploy describe ---\n" + desc + "\n\n--- pods ---\n" + pods + "\n\n--- operator logs ---\n" + logs)
3535
}
36+
By("waiting for operator webhook endpoint to have a Ready backend")
37+
Eventually(func() string {
38+
out, _ := kubectl("get", "endpoints/hermes-operator-webhook", "-n", "hermes-system",
39+
"-o", "jsonpath={.subsets[0].addresses[0].ip}")
40+
return strings.TrimSpace(out)
41+
}, 3*time.Minute, 5*time.Second).ShouldNot(BeEmpty(),
42+
"operator webhook backend never became ready; helm --wait passed but the validating-webhook service has no endpoints")
43+
3644
By("installing MinIO for backup/restore e2e")
3745
InstallMinIO()
3846
CreateHermesS3CredsSecret("default")

0 commit comments

Comments
 (0)