diff --git a/internal/mode/static/config_updater_test.go b/internal/mode/static/config_updater_test.go index c0830124d0..94807253b2 100644 --- a/internal/mode/static/config_updater_test.go +++ b/internal/mode/static/config_updater_test.go @@ -34,7 +34,6 @@ func TestUpdateControlPlane(t *testing.T) { } logger := zap.New() - fakeEventRecorder := record.NewFakeRecorder(1) nsname := types.NamespacedName{Namespace: "test", Name: "test"} tests := []struct { @@ -82,6 +81,8 @@ func TestUpdateControlPlane(t *testing.T) { }, } + fakeEventRecorder := record.NewFakeRecorder(1) + err := updateControlPlane(test.nginxGateway, logger, fakeEventRecorder, nsname, fakeLogSetter) if test.expErrString != "" {