diff --git a/test/integration/apimanager_controller_test.go b/test/integration/apimanager_controller_test.go index b5002d2ac..e28eeacef 100644 --- a/test/integration/apimanager_controller_test.go +++ b/test/integration/apimanager_controller_test.go @@ -214,11 +214,6 @@ var _ = Describe("APIManager controller", func() { // Verify no perpetual reconciliation occurred during initial deployment. verifyNoDeploymentUpdates(0) - // Trigger a synthetic change and confirm the operator corrects it exactly once. - triggerSyntheticDeploymentUpdate(testNamespace, GinkgoWriter) - time.Sleep(settlingPeriod) - verifyNoDeploymentUpdates(1) - elapsed := time.Since(start) fmt.Fprintf(GinkgoWriter, "APIManager creation and availability took '%s'\n", elapsed) }) @@ -1061,36 +1056,6 @@ func testCustomEnvironmentContent() string { ` } -// triggerSyntheticDeploymentUpdate patches a monitored deployment with a dummy -// image tag, then waits for the operator to reconcile it back. This guarantees -// at least one Deployment UPDATE in the ReconcileCounter, proving the counter -// is wired correctly and not silently counting nothing. -func triggerSyntheticDeploymentUpdate(namespace string, w io.Writer) { - const deploymentName = "system-memcache" - - dep := &appsv1.Deployment{} - Expect(testK8sClient.Get(context.Background(), - types.NamespacedName{Name: deploymentName, Namespace: namespace}, dep)).To(Succeed()) - - originalImage := dep.Spec.Template.Spec.Containers[0].Image - dep.Spec.Template.Spec.Containers[0].Image = originalImage + "-synthetic-test-trigger" - Expect(testK8sClient.Update(context.Background(), dep)).To(Succeed()) - fmt.Fprintf(w, "Synthetic image change applied to %s; waiting for operator to reconcile back\n", deploymentName) - - // Use testK8sAPIClient (direct API server read) to avoid the cached client - // returning the pre-update image before the operator has processed the change. - Eventually(func() bool { - d := &appsv1.Deployment{} - if err := testK8sAPIClient.Get(context.Background(), - types.NamespacedName{Name: deploymentName, Namespace: namespace}, d); err != nil { - return false - } - return d.Spec.Template.Spec.Containers[0].Image == originalImage - }, 2*time.Minute, 2*time.Second).Should(BeTrue(), - fmt.Sprintf("operator did not revert synthetic image change on %s within 2 minutes", deploymentName)) - fmt.Fprintf(w, "Operator reconciled %s back to desired image\n", deploymentName) -} - func testGetCustomEnvironmentSecret(namespace string) *corev1.Secret { customEnvironmentSecret := corev1.Secret{ TypeMeta: metav1.TypeMeta{ diff --git a/test/integration/verify_no_perpetual_reconciliation_test.go b/test/integration/verify_no_perpetual_reconciliation_test.go index 0f99c71d8..58ef31dc6 100644 --- a/test/integration/verify_no_perpetual_reconciliation_test.go +++ b/test/integration/verify_no_perpetual_reconciliation_test.go @@ -3,16 +3,11 @@ package integration import ( "fmt" "sort" - "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) -// settlingPeriod is the time to wait after the synthetic update is reconciled -// to confirm no further updates occur. -const settlingPeriod = 30 * time.Second - // verifyNoDeploymentUpdates asserts that the reconcile counter recorded exactly // the expected number of deployment updates, then resets the counter so the // next measurement window starts from zero.