diff --git a/controllers/githubactionrunner_controller_test.go b/controllers/githubactionrunner_controller_test.go index 75a65bb1..f6213f86 100644 --- a/controllers/githubactionrunner_controller_test.go +++ b/controllers/githubactionrunner_controller_test.go @@ -109,7 +109,7 @@ func TestGithubactionRunnerController(t *testing.T) { s := scheme.Scheme s.AddKnownTypes(v1alpha1.SchemeBuilder.GroupVersion, runner) - cl := fake.NewFakeClientWithScheme(s, objs...) + cl := fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build() fakeRecorder := record.NewFakeRecorder(10) r := &GithubActionRunnerReconciler{ReconcilerBase: util.NewReconcilerBase(cl, s, nil, fakeRecorder, nil), Log: zap.New(), GithubAPI: mockAPI}