From a0b86825a7456b4a8745115cc5b5a2455afb65a7 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Tue, 19 Mar 2024 01:49:36 +0000 Subject: [PATCH] Fix not to use kubeconfig --- pkg/index/operator/service/operator_test.go | 24 ++++++--------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/pkg/index/operator/service/operator_test.go b/pkg/index/operator/service/operator_test.go index f212dbdcce..f96fe89fa6 100644 --- a/pkg/index/operator/service/operator_test.go +++ b/pkg/index/operator/service/operator_test.go @@ -302,25 +302,15 @@ func Test_operator_podOnReconcile(t *testing.T) { } defer mock.AssertExpectations(tt) - opts := []Option{ - WithK8sClient(mock), - WithReadReplicaEnabled(test.readReplicaEnabled), - } + concurrency := uint(1) if test.rotationJobConcurrency != 0 { - opts = append(opts, WithRotationJobConcurrency(test.rotationJobConcurrency)) + concurrency = test.rotationJobConcurrency + } + op := operator{ + client: mock, + readReplicaEnabled: test.readReplicaEnabled, + rotationJobConcurrency: concurrency, } - o, err := New( - "namespace", - "agentName", - "rotatorName", - "targetReadReplicaIDEnvName", - nil, - opts..., - ) - require.NoError(t, err) - - op, ok := o.(*operator) - require.True(t, ok) op.rotatorJob = &client.Job{ ObjectMeta: client.ObjectMeta{