diff --git a/service/access_control_service_test.go b/service/access_control_service_test.go index 996350357..4e333cc9c 100644 --- a/service/access_control_service_test.go +++ b/service/access_control_service_test.go @@ -19,9 +19,10 @@ package service import ( "context" "fmt" + "testing" + "github.com/kubeslice/kubeslice-controller/metrics" metricMock "github.com/kubeslice/kubeslice-controller/metrics/mocks" - "testing" ossEvents "github.com/kubeslice/kubeslice-controller/events" "github.com/kubeslice/kubeslice-controller/service/mocks" @@ -1270,7 +1271,7 @@ func ACS_ReconcileWorkerClusterServiceAccountAndRoleBindings(t *testing.T) { mMock.AssertExpectations(t) } -func prepareACSTestContext(ctx context.Context, client util.Client, +func prepareACSTestContext(ctx context.Context, client *utilMock.Client, scheme *runtime.Scheme) context.Context { if scheme == nil { scheme = runtime.NewScheme() diff --git a/service/namespace_service_test.go b/service/namespace_service_test.go index 42a15a513..d87d3a71c 100644 --- a/service/namespace_service_test.go +++ b/service/namespace_service_test.go @@ -177,7 +177,7 @@ func TestDeleteNamespace_DoesNothingIfNamespaceDoNotExist(t *testing.T) { mMock.AssertExpectations(t) } -func prepareNamespaceTestContext(ctx context.Context, client util.Client, scheme *runtime.Scheme) context.Context { +func prepareNamespaceTestContext(ctx context.Context, client *utilMock.Client, scheme *runtime.Scheme) context.Context { eventRecorder := events.NewEventRecorder(client, scheme, ossEvents.EventsMap, events.EventRecorderOptions{ Version: "v1alpha1", Cluster: util.ClusterController, diff --git a/service/project_service_test.go b/service/project_service_test.go index 21398c6cb..10c830281 100644 --- a/service/project_service_test.go +++ b/service/project_service_test.go @@ -276,7 +276,7 @@ func setupProjectTest(name string, namespace string) (*mocks.INamespaceService, return nsServiceMock, acsServicemOCK, projectService, requestObj, clientMock, project, ctx, clusterServiceMock, sliceConfigServiceMock, serviceExportConfigServiceMock, sliceQoSConfigServiceMock, mMock } -func prepareProjectTestContext(ctx context.Context, client util.Client, +func prepareProjectTestContext(ctx context.Context, client *utilMock.Client, scheme *runtime.Scheme) context.Context { eventRecorder := events.NewEventRecorder(client, scheme, ossEvents.EventsMap, events.EventRecorderOptions{ Version: "v1alpha1", diff --git a/service/worker_slice_gateway_service_test.go b/service/worker_slice_gateway_service_test.go index f09906b8f..9b27dd97d 100644 --- a/service/worker_slice_gateway_service_test.go +++ b/service/worker_slice_gateway_service_test.go @@ -551,7 +551,6 @@ func testNodeIpReconciliationOfWorkerSliceGatewaysExists(t *testing.T) { Annotations: nil, OwnerReferences: nil, Finalizers: nil, - ClusterName: "", ManagedFields: nil, }, Spec: controllerv1alpha1.ClusterSpec{},