diff --git a/pkg/syncer/resource_syncer_test.go b/pkg/syncer/resource_syncer_test.go index b1c764fd..bb42b6c7 100644 --- a/pkg/syncer/resource_syncer_test.go +++ b/pkg/syncer/resource_syncer_test.go @@ -65,7 +65,7 @@ var _ = Describe("Resource Syncer", func() { }) func testLocalToRemote() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) When("a resource without a cluster ID label is created in the local datastore", func() { d.verifyDistributeOnCreateTest("") @@ -93,7 +93,7 @@ func testLocalToRemote() { } func testRemoteToLocalWithLocalClusterID() { - d := newTestDiver(test.RemoteNamespace, "local", syncer.RemoteToLocal) + d := newTestDriver(test.RemoteNamespace, "local", syncer.RemoteToLocal) When("a resource with a non-local cluster ID label is created in the remote datastore", func() { d.verifyDistributeOnCreateTest("remote") @@ -133,7 +133,7 @@ func testRemoteToLocalWithLocalClusterID() { } func testRemoteToLocalWithoutLocalClusterID() { - d := newTestDiver(test.RemoteNamespace, "", syncer.RemoteToLocal) + d := newTestDriver(test.RemoteNamespace, "", syncer.RemoteToLocal) When("a resource with a cluster ID label is created in the remote datastore", func() { d.verifyDistributeOnCreateTest("remote") @@ -161,7 +161,7 @@ func testRemoteToLocalWithoutLocalClusterID() { } func testTransformFunction() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) ctx := context.TODO() var transformed *corev1.Pod @@ -376,7 +376,7 @@ func testTransformFunction() { } func testOnSuccessfulSyncFunction() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) ctx := context.TODO() var ( @@ -524,7 +524,7 @@ func testOnSuccessfulSyncFunction() { } func testShouldProcessFunction() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) ctx := context.TODO() var ( @@ -637,7 +637,7 @@ func testShouldProcessFunction() { } func testSyncErrors() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) ctx := context.TODO() var expectedErr error @@ -690,7 +690,7 @@ func testSyncErrors() { } func testUpdateSuppression() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) BeforeEach(func() { d.addInitialResource(d.resource) @@ -818,7 +818,7 @@ func testUpdateSuppression() { } func testGetResource() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) When("the requested resource exists", func() { BeforeEach(func() { @@ -847,7 +847,7 @@ func testGetResource() { } func testListResources() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) var resource2 *corev1.Pod @@ -879,7 +879,7 @@ func testListResources() { } func testListResourcesBySelector() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) newPod := func(i int, labels map[string]string) *corev1.Pod { return &corev1.Pod{ @@ -959,7 +959,7 @@ func testListResourcesBySelector() { } func testRequeueResource() { - d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote) + d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote) var transformed *corev1.Pod @@ -1022,7 +1022,7 @@ type testDriver struct { handledError chan error } -func newTestDiver(sourceNamespace, localClusterID string, syncDirection syncer.SyncDirection) *testDriver { +func newTestDriver(sourceNamespace, localClusterID string, syncDirection syncer.SyncDirection) *testDriver { resourceType := &corev1.Pod{} d := &testDriver{ config: syncer.ResourceSyncerConfig{