Skip to content

Commit

Permalink
Remove flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
skhalash committed Dec 17, 2024
1 parent b9cc6f1 commit d03f167
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions test/e2e/overrides_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -72,23 +71,6 @@ var _ = Describe(suite.ID(), Label(suite.LabelTelemetry), Ordered, func() {
}, periodic.ConsistentlyTimeout, periodic.DefaultInterval).Should(Succeed())
}

assertTelemetryReconciliationDisabled := func(ctx context.Context, k8sClient client.Client, webhookName string) {
key := types.NamespacedName{
Name: webhookName,
}
var validatingWebhookConfiguration admissionregistrationv1.ValidatingWebhookConfiguration
Expect(k8sClient.Get(ctx, key, &validatingWebhookConfiguration)).To(Succeed())

validatingWebhookConfiguration.Webhooks[0].ClientConfig.CABundle = []byte{}
Expect(k8sClient.Update(ctx, &validatingWebhookConfiguration)).To(Succeed())

// The deleted CA bundle should not be restored, since the reconciliation is disabled by the overrides configmap
Consistently(func(g Gomega) {
g.Expect(k8sClient.Get(ctx, key, &validatingWebhookConfiguration)).To(Succeed())
g.Expect(validatingWebhookConfiguration.Webhooks[0].ClientConfig.CABundle).To(BeEmpty())
}, periodic.ConsistentlyTimeout, periodic.DefaultInterval).Should(Succeed())
}

BeforeAll(func() {
now = time.Now().UTC()
k8sObjects := makeResources()
Expand Down Expand Up @@ -189,9 +171,5 @@ var _ = Describe(suite.ID(), Label(suite.LabelTelemetry), Ordered, func() {
It("Should disable the reconciliation of the tracepipeline", func() {
assertPipelineReconciliationDisabled(ctx, k8sClient, kitkyma.TraceGatewayConfigMap, appNameLabelKey)
})

It("Should disable the reconciliation of the telemetry CR", func() {
assertTelemetryReconciliationDisabled(ctx, k8sClient, kitkyma.ValidatingWebhookName)
})
})
})

0 comments on commit d03f167

Please sign in to comment.