Skip to content

Commit

Permalink
Fix not to use kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Mar 19, 2024
1 parent d8923e2 commit a0b8682
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions pkg/index/operator/service/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit a0b8682

Please sign in to comment.