Commit d08e9d96 authored by Maru Newby's avatar Maru Newby

fed: Create generic synchronizer from refactored secret controller

parent 82e73efe
...@@ -77,7 +77,7 @@ func TestSecretController(t *testing.T) { ...@@ -77,7 +77,7 @@ func TestSecretController(t *testing.T) {
return nil, fmt.Errorf("Unknown cluster") return nil, fmt.Errorf("Unknown cluster")
} }
} }
setClientFactory(secretController.secretFederatedInformer, informerClientFactory) setClientFactory(secretController.informer, informerClientFactory)
secretController.minimizeLatency() secretController.minimizeLatency()
...@@ -115,7 +115,7 @@ func TestSecretController(t *testing.T) { ...@@ -115,7 +115,7 @@ func TestSecretController(t *testing.T) {
// Wait for the secret to appear in the informer store // Wait for the secret to appear in the informer store
err := WaitForStoreUpdate( err := WaitForStoreUpdate(
secretController.secretFederatedInformer.GetTargetStore(), secretController.informer.GetTargetStore(),
cluster1.Name, types.NamespacedName{Namespace: secret1.Namespace, Name: secret1.Name}.String(), wait.ForeverTestTimeout) cluster1.Name, types.NamespacedName{Namespace: secret1.Namespace, Name: secret1.Name}.String(), wait.ForeverTestTimeout)
assert.Nil(t, err, "secret should have appeared in the informer store") assert.Nil(t, err, "secret should have appeared in the informer store")
...@@ -146,7 +146,7 @@ func TestSecretController(t *testing.T) { ...@@ -146,7 +146,7 @@ func TestSecretController(t *testing.T) {
// Wait for the secret to be updated in the informer store. // Wait for the secret to be updated in the informer store.
err = WaitForSecretStoreUpdate( err = WaitForSecretStoreUpdate(
secretController.secretFederatedInformer.GetTargetStore(), secretController.informer.GetTargetStore(),
cluster1.Name, types.NamespacedName{Namespace: secret1.Namespace, Name: secret1.Name}.String(), cluster1.Name, types.NamespacedName{Namespace: secret1.Namespace, Name: secret1.Name}.String(),
&secret1, wait.ForeverTestTimeout) &secret1, wait.ForeverTestTimeout)
assert.NoError(t, err, "secret should have been updated in the informer store") assert.NoError(t, err, "secret should have been updated in the informer store")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment