diff --git a/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go b/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go index f5cfa486e2c..3ac9052ba89 100644 --- a/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go +++ b/federation/pkg/federation-controller/daemonset/daemonset_controller_test.go @@ -97,10 +97,9 @@ func TestDaemonSetController(t *testing.T) { // Test add federated daemonset. daemonsetWatch.Add(&daemonset1) - // There should be 2 updates to add both the finalizers. + // There should be an update to add both the finalizers. updatedDaemonSet := GetDaemonSetFromChan(daemonsetUpdateChan) assert.True(t, daemonsetController.hasFinalizerFunc(updatedDaemonSet, deletionhelper.FinalizerDeleteFromUnderlyingClusters)) - updatedDaemonSet = GetDaemonSetFromChan(daemonsetUpdateChan) assert.True(t, daemonsetController.hasFinalizerFunc(updatedDaemonSet, metav1.FinalizerOrphan)) daemonset1 = *updatedDaemonSet diff --git a/federation/pkg/federation-controller/ingress/ingress_controller_test.go b/federation/pkg/federation-controller/ingress/ingress_controller_test.go index 8d19afe6f9c..132532a447d 100644 --- a/federation/pkg/federation-controller/ingress/ingress_controller_test.go +++ b/federation/pkg/federation-controller/ingress/ingress_controller_test.go @@ -140,10 +140,9 @@ func TestIngressController(t *testing.T) { assert.Equal(t, cluster.ObjectMeta.Annotations[uidAnnotationKey], cfg1.Data[uidKey]) t.Logf("Checking that appropriate finalizers are added") - // There should be 2 updates to add both the finalizers. + // There should be an update to add both the finalizers. updatedIngress := GetIngressFromChan(t, fedIngressUpdateChan) assert.True(t, ingressController.hasFinalizerFunc(updatedIngress, deletionhelper.FinalizerDeleteFromUnderlyingClusters)) - updatedIngress = GetIngressFromChan(t, fedIngressUpdateChan) assert.True(t, ingressController.hasFinalizerFunc(updatedIngress, metav1.FinalizerOrphan), fmt.Sprintf("ingress does not have the orphan finalizer: %v", updatedIngress)) fedIngress = *updatedIngress diff --git a/federation/pkg/federation-controller/secret/secret_controller_test.go b/federation/pkg/federation-controller/secret/secret_controller_test.go index 4fea99e5da4..24b790dad2e 100644 --- a/federation/pkg/federation-controller/secret/secret_controller_test.go +++ b/federation/pkg/federation-controller/secret/secret_controller_test.go @@ -97,10 +97,9 @@ func TestSecretController(t *testing.T) { // Test add federated secret. secretWatch.Add(&secret1) - // There should be 2 updates to add both the finalizers. + // There should be an update to add both the finalizers. updatedSecret := GetSecretFromChan(secretUpdateChan) assert.True(t, secretController.hasFinalizerFunc(updatedSecret, deletionhelper.FinalizerDeleteFromUnderlyingClusters)) - updatedSecret = GetSecretFromChan(secretUpdateChan) assert.True(t, secretController.hasFinalizerFunc(updatedSecret, metav1.FinalizerOrphan)) secret1 = *updatedSecret