@@ -26,6 +26,7 @@ import (
26
26
27
27
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
28
28
"k8s.io/client-go/kubernetes/scheme"
29
+ "k8s.io/client-go/tools/record"
29
30
ctrl "sigs.k8s.io/controller-runtime"
30
31
"sigs.k8s.io/controller-runtime/pkg/client"
31
32
@@ -34,7 +35,7 @@ import (
34
35
"github.com/fluxcd/pkg/runtime/testenv"
35
36
sourcev1 "github.com/fluxcd/source-controller/api/v1"
36
37
37
- imagev1 "github.com/fluxcd/image-automation-controller/api/v1beta1 "
38
+ imagev1 "github.com/fluxcd/image-automation-controller/api/v1beta2 "
38
39
// +kubebuilder:scaffold:imports
39
40
)
40
41
@@ -85,9 +86,10 @@ func runTestsWithFeatures(m *testing.M, feats map[string]bool) int {
85
86
86
87
controllerName := "image-automation-controller"
87
88
if err := (& ImageUpdateAutomationReconciler {
88
- Client : testEnv ,
89
- EventRecorder : testEnv .GetEventRecorderFor (controllerName ),
90
- features : feats ,
89
+ Client : testEnv ,
90
+ EventRecorder : record .NewFakeRecorder (32 ),
91
+ features : feats ,
92
+ ControllerName : controllerName ,
91
93
}).SetupWithManager (ctx , testEnv , ImageUpdateAutomationReconcilerOptions {
92
94
RateLimiter : controller .GetDefaultRateLimiter (),
93
95
}); err != nil {
0 commit comments