Skip to content

Commit

Permalink
fixing test setup for new controller runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed May 6, 2024
1 parent b3d1a76 commit e1791b2
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ func TestReconcile_Success(tt *testing.T) {
Watcher: test.MockConnMgrForIPAndPort(t, host, port, false),
}

fakeClient := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(tc.registration).Build()
fakeClient := fake.NewClientBuilder().
WithScheme(s).
WithRuntimeObjects(tc.registration).
WithStatusSubresource(&v1alpha1.Registration{}).
Build()

controller := &configentries.RegistrationsController{
Client: fakeClient,
Expand Down Expand Up @@ -243,7 +247,11 @@ func TestReconcile_Failure(tt *testing.T) {
Watcher: test.MockConnMgrForIPAndPort(t, host, port, false),
}

fakeClient := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(tc.registration).Build()
fakeClient := fake.NewClientBuilder().
WithScheme(s).
WithRuntimeObjects(tc.registration).
WithStatusSubresource(&v1alpha1.Registration{}).
Build()

controller := &configentries.RegistrationsController{
Client: fakeClient,
Expand Down

0 comments on commit e1791b2

Please sign in to comment.