Skip to content

Commit

Permalink
Rename newTestDiver (sic) to newTestDriver
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
  • Loading branch information
tpantelis authored and dfarrell07 committed Aug 2, 2023
1 parent 5f9b33d commit 9d8a8b9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions pkg/syncer/resource_syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -376,7 +376,7 @@ func testTransformFunction() {
}

func testOnSuccessfulSyncFunction() {
d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote)
d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote)
ctx := context.TODO()

var (
Expand Down Expand Up @@ -524,7 +524,7 @@ func testOnSuccessfulSyncFunction() {
}

func testShouldProcessFunction() {
d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote)
d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote)
ctx := context.TODO()

var (
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -847,7 +847,7 @@ func testGetResource() {
}

func testListResources() {
d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote)
d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote)

var resource2 *corev1.Pod

Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -959,7 +959,7 @@ func testListResourcesBySelector() {
}

func testRequeueResource() {
d := newTestDiver(test.LocalNamespace, "", syncer.LocalToRemote)
d := newTestDriver(test.LocalNamespace, "", syncer.LocalToRemote)

var transformed *corev1.Pod

Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 9d8a8b9

Please sign in to comment.