Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions tests/e2e/gatewaycontroller/gateway_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"

"istio.io/istio/pkg/ptr"
Expand Down Expand Up @@ -215,10 +216,20 @@ spec:
})

It("curl client pod is ready", func(ctx SpecContext) {
Eventually(func() error {
return common.CheckPodsReady(ctx, cl, gatewayNamespace)
// Check only the curl-client pod
Eventually(func(g Gomega) {
pod := &corev1.Pod{}
g.Expect(cl.Get(ctx, kube.Key("curl-client", gatewayNamespace), pod)).To(Succeed())
var ready bool
for _, cond := range pod.Status.Conditions {
if cond.Type == corev1.PodReady && cond.Status == corev1.ConditionTrue {
ready = true
break
}
}
g.Expect(ready).To(BeTrue(), "curl-client pod is not ready")
}).Should(Succeed())
Success("All pods in gateway namespace are ready")
Success("Curl client pod is ready")
})
})

Expand Down
13 changes: 8 additions & 5 deletions tests/e2e/library/library_reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,15 @@ var _ = Describe("Library Reconciliation", Label("library", "reconciliation"), O
webhookKey := types.NamespacedName{
Name: fmt.Sprintf("istio-validator-%s-%s", revision, namespace),
}
webhook := &admissionv1.ValidatingWebhookConfiguration{}
Expect(cl.Get(ctx, webhookKey, webhook)).To(Succeed())

webhook.Webhooks[0].Name = "xyz.xyz.xyz"
webhook.Webhooks[0].FailurePolicy = ptr.Of(admissionv1.Fail)
Expect(cl.Update(ctx, webhook)).To(Succeed())
// The background reconciler may update the webhook concurrently; retry on conflict.
Eventually(func(g Gomega) {
webhook := &admissionv1.ValidatingWebhookConfiguration{}
g.Expect(cl.Get(ctx, webhookKey, webhook)).To(Succeed())
webhook.Webhooks[0].Name = "xyz.xyz.xyz"
webhook.Webhooks[0].FailurePolicy = ptr.Of(admissionv1.Fail)
g.Expect(cl.Update(ctx, webhook)).To(Succeed())
}).Should(Succeed())

Eventually(func(g Gomega) {
restored := &admissionv1.ValidatingWebhookConfiguration{}
Expand Down