diff --git a/Makefile b/Makefile index 4f9cc18b9ae..fce38a4a276 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ AZWI_VER := v1.2.2 AZWI_BIN := azwi AZWI := $(TOOLS_BIN_DIR)/$(AZWI_BIN)-$(AZWI_VER) -MOCKGEN_VER := v0.4.0 +MOCKGEN_VER := v0.5.2 MOCKGEN_BIN := mockgen MOCKGEN := $(TOOLS_BIN_DIR)/$(MOCKGEN_BIN)-$(MOCKGEN_VER) diff --git a/azure/mock_azure/azure_mock.go b/azure/mock_azure/azure_mock.go index 2e1542f0db9..7f65eb27d78 100644 --- a/azure/mock_azure/azure_mock.go +++ b/azure/mock_azure/azure_mock.go @@ -45,6 +45,7 @@ import ( type MockReconciler struct { ctrl *gomock.Controller recorder *MockReconcilerMockRecorder + isgomock struct{} } // MockReconcilerMockRecorder is the mock recorder for MockReconciler. @@ -96,6 +97,7 @@ func (mr *MockReconcilerMockRecorder) Reconcile(ctx any) *gomock.Call { type MockPauser struct { ctrl *gomock.Controller recorder *MockPauserMockRecorder + isgomock struct{} } // MockPauserMockRecorder is the mock recorder for MockPauser. @@ -133,6 +135,7 @@ func (mr *MockPauserMockRecorder) Pause(arg0 any) *gomock.Call { type MockServiceReconciler struct { ctrl *gomock.Controller recorder *MockServiceReconcilerMockRecorder + isgomock struct{} } // MockServiceReconcilerMockRecorder is the mock recorder for MockServiceReconciler. @@ -198,6 +201,7 @@ func (mr *MockServiceReconcilerMockRecorder) Reconcile(ctx any) *gomock.Call { type MockAuthorizer struct { ctrl *gomock.Controller recorder *MockAuthorizerMockRecorder + isgomock struct{} } // MockAuthorizerMockRecorder is the mock recorder for MockAuthorizer. @@ -333,6 +337,7 @@ func (mr *MockAuthorizerMockRecorder) Token() *gomock.Call { type MockNetworkDescriber struct { ctrl *gomock.Controller recorder *MockNetworkDescriberMockRecorder + isgomock struct{} } // MockNetworkDescriberMockRecorder is the mock recorder for MockNetworkDescriber. @@ -578,6 +583,7 @@ func (mr *MockNetworkDescriberMockRecorder) Vnet() *gomock.Call { type MockClusterDescriber struct { ctrl *gomock.Controller recorder *MockClusterDescriberMockRecorder + isgomock struct{} } // MockClusterDescriberMockRecorder is the mock recorder for MockClusterDescriber. @@ -867,6 +873,7 @@ func (mr *MockClusterDescriberMockRecorder) Token() *gomock.Call { type MockAsyncStatusUpdater struct { ctrl *gomock.Controller recorder *MockAsyncStatusUpdaterMockRecorder + isgomock struct{} } // MockAsyncStatusUpdaterMockRecorder is the mock recorder for MockAsyncStatusUpdater. @@ -1006,6 +1013,7 @@ func (mr *MockAsyncStatusUpdaterMockRecorder) UpdatePutStatus(arg0, arg1, arg2 a type MockAsyncReconciler struct { ctrl *gomock.Controller recorder *MockAsyncReconcilerMockRecorder + isgomock struct{} } // MockAsyncReconcilerMockRecorder is the mock recorder for MockAsyncReconciler. @@ -1071,6 +1079,7 @@ func (mr *MockAsyncReconcilerMockRecorder) DefaultedReconcilerRequeue() *gomock. type MockClusterScoper struct { ctrl *gomock.Controller recorder *MockClusterScoperMockRecorder + isgomock struct{} } // MockClusterScoperMockRecorder is the mock recorder for MockClusterScoper. @@ -1726,6 +1735,7 @@ func (mr *MockClusterScoperMockRecorder) Vnet() *gomock.Call { type MockManagedClusterScoper struct { ctrl *gomock.Controller recorder *MockManagedClusterScoperMockRecorder + isgomock struct{} } // MockManagedClusterScoperMockRecorder is the mock recorder for MockManagedClusterScoper. @@ -2057,6 +2067,7 @@ func (mr *MockManagedClusterScoperMockRecorder) Token() *gomock.Call { type MockResourceSpecGetter struct { ctrl *gomock.Controller recorder *MockResourceSpecGetterMockRecorder + isgomock struct{} } // MockResourceSpecGetterMockRecorder is the mock recorder for MockResourceSpecGetter. @@ -2137,6 +2148,7 @@ func (mr *MockResourceSpecGetterMockRecorder) ResourceName() *gomock.Call { type MockResourceSpecGetterWithHeaders struct { ctrl *gomock.Controller recorder *MockResourceSpecGetterWithHeadersMockRecorder + isgomock struct{} } // MockResourceSpecGetterWithHeadersMockRecorder is the mock recorder for MockResourceSpecGetterWithHeaders. @@ -2231,6 +2243,7 @@ func (mr *MockResourceSpecGetterWithHeadersMockRecorder) ResourceName() *gomock. type MockASOResourceSpecGetter[T genruntime.MetaObject] struct { ctrl *gomock.Controller recorder *MockASOResourceSpecGetterMockRecorder[T] + isgomock struct{} } // MockASOResourceSpecGetterMockRecorder is the mock recorder for MockASOResourceSpecGetter. @@ -2297,6 +2310,7 @@ func (mr *MockASOResourceSpecGetterMockRecorder[T]) WasManaged(arg0 any) *gomock type MockCredentialCache struct { ctrl *gomock.Controller recorder *MockCredentialCacheMockRecorder + isgomock struct{} } // MockCredentialCacheMockRecorder is the mock recorder for MockCredentialCache. diff --git a/azure/scope/mocks/node_getter_mock.go b/azure/scope/mocks/node_getter_mock.go index 578ae87ff3b..b4b38b8b9c0 100644 --- a/azure/scope/mocks/node_getter_mock.go +++ b/azure/scope/mocks/node_getter_mock.go @@ -37,6 +37,7 @@ import ( type MocknodeGetter struct { ctrl *gomock.Controller recorder *MocknodeGetterMockRecorder + isgomock struct{} } // MocknodeGetterMockRecorder is the mock recorder for MocknodeGetter. diff --git a/azure/services/agentpools/mock_agentpools/agentpools_mock.go b/azure/services/agentpools/mock_agentpools/agentpools_mock.go index 14a17a10f9c..d5605eb18f9 100644 --- a/azure/services/agentpools/mock_agentpools/agentpools_mock.go +++ b/azure/services/agentpools/mock_agentpools/agentpools_mock.go @@ -41,6 +41,7 @@ import ( type MockAgentPoolScope struct { ctrl *gomock.Controller recorder *MockAgentPoolScopeMockRecorder + isgomock struct{} } // MockAgentPoolScopeMockRecorder is the mock recorder for MockAgentPoolScope. diff --git a/azure/services/aso/mock_aso/aso_mock.go b/azure/services/aso/mock_aso/aso_mock.go index 361371ca577..07423b710a0 100644 --- a/azure/services/aso/mock_aso/aso_mock.go +++ b/azure/services/aso/mock_aso/aso_mock.go @@ -42,6 +42,7 @@ import ( type MockReconciler[T genruntime.MetaObject] struct { ctrl *gomock.Controller recorder *MockReconcilerMockRecorder[T] + isgomock struct{} } // MockReconcilerMockRecorder is the mock recorder for MockReconciler. @@ -108,6 +109,7 @@ func (mr *MockReconcilerMockRecorder[T]) PauseResource(ctx, resource, serviceNam type MockTagsGetterSetter[T genruntime.MetaObject] struct { ctrl *gomock.Controller recorder *MockTagsGetterSetterMockRecorder[T] + isgomock struct{} } // MockTagsGetterSetterMockRecorder is the mock recorder for MockTagsGetterSetter. @@ -171,6 +173,7 @@ func (mr *MockTagsGetterSetterMockRecorder[T]) SetTags(resource, tags any) *gomo type MockPatcher struct { ctrl *gomock.Controller recorder *MockPatcherMockRecorder + isgomock struct{} } // MockPatcherMockRecorder is the mock recorder for MockPatcher. @@ -208,6 +211,7 @@ func (mr *MockPatcherMockRecorder) ExtraPatches() *gomock.Call { type MockScope struct { ctrl *gomock.Controller recorder *MockScopeMockRecorder + isgomock struct{} } // MockScopeMockRecorder is the mock recorder for MockScope. diff --git a/azure/services/async/mock_async/async_mock.go b/azure/services/async/mock_async/async_mock.go index 02df463cf5c..76ea8e9d171 100644 --- a/azure/services/async/mock_async/async_mock.go +++ b/azure/services/async/mock_async/async_mock.go @@ -42,6 +42,7 @@ import ( type MockFutureScope struct { ctrl *gomock.Controller recorder *MockFutureScopeMockRecorder + isgomock struct{} } // MockFutureScopeMockRecorder is the mock recorder for MockFutureScope. @@ -181,6 +182,7 @@ func (mr *MockFutureScopeMockRecorder) UpdatePutStatus(arg0, arg1, arg2 any) *go type MockGetter struct { ctrl *gomock.Controller recorder *MockGetterMockRecorder + isgomock struct{} } // MockGetterMockRecorder is the mock recorder for MockGetter. @@ -219,6 +221,7 @@ func (mr *MockGetterMockRecorder) Get(ctx, spec any) *gomock.Call { type MockTagsGetter struct { ctrl *gomock.Controller recorder *MockTagsGetterMockRecorder + isgomock struct{} } // MockTagsGetterMockRecorder is the mock recorder for MockTagsGetter. @@ -257,6 +260,7 @@ func (mr *MockTagsGetterMockRecorder) GetAtScope(ctx, scope any) *gomock.Call { type MockCreator[T any] struct { ctrl *gomock.Controller recorder *MockCreatorMockRecorder[T] + isgomock struct{} } // MockCreatorMockRecorder is the mock recorder for MockCreator. @@ -311,6 +315,7 @@ func (mr *MockCreatorMockRecorder[T]) Get(ctx, spec any) *gomock.Call { type MockDeleter[T any] struct { ctrl *gomock.Controller recorder *MockDeleterMockRecorder[T] + isgomock struct{} } // MockDeleterMockRecorder is the mock recorder for MockDeleter. @@ -349,6 +354,7 @@ func (mr *MockDeleterMockRecorder[T]) DeleteAsync(ctx, spec, resumeToken any) *g type MockReconciler struct { ctrl *gomock.Controller recorder *MockReconcilerMockRecorder + isgomock struct{} } // MockReconcilerMockRecorder is the mock recorder for MockReconciler. diff --git a/azure/services/availabilitysets/mock_availabilitysets/availabilitysets_mock.go b/azure/services/availabilitysets/mock_availabilitysets/availabilitysets_mock.go index 65102e7ae21..056913891e6 100644 --- a/azure/services/availabilitysets/mock_availabilitysets/availabilitysets_mock.go +++ b/azure/services/availabilitysets/mock_availabilitysets/availabilitysets_mock.go @@ -40,6 +40,7 @@ import ( type MockAvailabilitySetScope struct { ctrl *gomock.Controller recorder *MockAvailabilitySetScopeMockRecorder + isgomock struct{} } // MockAvailabilitySetScopeMockRecorder is the mock recorder for MockAvailabilitySetScope. diff --git a/azure/services/disks/mock_disks/disks_mock.go b/azure/services/disks/mock_disks/disks_mock.go index ca5f2d6863a..9947156ccd1 100644 --- a/azure/services/disks/mock_disks/disks_mock.go +++ b/azure/services/disks/mock_disks/disks_mock.go @@ -40,6 +40,7 @@ import ( type MockDiskScope struct { ctrl *gomock.Controller recorder *MockDiskScopeMockRecorder + isgomock struct{} } // MockDiskScopeMockRecorder is the mock recorder for MockDiskScope. diff --git a/azure/services/groups/mock_groups/groups_mock.go b/azure/services/groups/mock_groups/groups_mock.go index d72261cc9d3..34152ae97ec 100644 --- a/azure/services/groups/mock_groups/groups_mock.go +++ b/azure/services/groups/mock_groups/groups_mock.go @@ -41,6 +41,7 @@ import ( type MockGroupScope struct { ctrl *gomock.Controller recorder *MockGroupScopeMockRecorder + isgomock struct{} } // MockGroupScopeMockRecorder is the mock recorder for MockGroupScope. diff --git a/azure/services/identities/mock_identities/client_mock.go b/azure/services/identities/mock_identities/client_mock.go index 46c4fa1e64f..ee6b0124fae 100644 --- a/azure/services/identities/mock_identities/client_mock.go +++ b/azure/services/identities/mock_identities/client_mock.go @@ -37,6 +37,7 @@ import ( type MockClient struct { ctrl *gomock.Controller recorder *MockClientMockRecorder + isgomock struct{} } // MockClientMockRecorder is the mock recorder for MockClient. diff --git a/azure/services/inboundnatrules/mock_inboundnatrules/client_mock.go b/azure/services/inboundnatrules/mock_inboundnatrules/client_mock.go index 55d09cda889..fe54baf42ef 100644 --- a/azure/services/inboundnatrules/mock_inboundnatrules/client_mock.go +++ b/azure/services/inboundnatrules/mock_inboundnatrules/client_mock.go @@ -37,6 +37,7 @@ import ( type Mockclient struct { ctrl *gomock.Controller recorder *MockclientMockRecorder + isgomock struct{} } // MockclientMockRecorder is the mock recorder for Mockclient. diff --git a/azure/services/inboundnatrules/mock_inboundnatrules/inboundnatrules_mock.go b/azure/services/inboundnatrules/mock_inboundnatrules/inboundnatrules_mock.go index 807ebb08f8e..4b9fe77ac4a 100644 --- a/azure/services/inboundnatrules/mock_inboundnatrules/inboundnatrules_mock.go +++ b/azure/services/inboundnatrules/mock_inboundnatrules/inboundnatrules_mock.go @@ -40,6 +40,7 @@ import ( type MockInboundNatScope struct { ctrl *gomock.Controller recorder *MockInboundNatScopeMockRecorder + isgomock struct{} } // MockInboundNatScopeMockRecorder is the mock recorder for MockInboundNatScope. diff --git a/azure/services/loadbalancers/mock_loadbalancers/loadbalancers_mock.go b/azure/services/loadbalancers/mock_loadbalancers/loadbalancers_mock.go index 36d31f047ac..30af94dbabe 100644 --- a/azure/services/loadbalancers/mock_loadbalancers/loadbalancers_mock.go +++ b/azure/services/loadbalancers/mock_loadbalancers/loadbalancers_mock.go @@ -42,6 +42,7 @@ import ( type MockLBScope struct { ctrl *gomock.Controller recorder *MockLBScopeMockRecorder + isgomock struct{} } // MockLBScopeMockRecorder is the mock recorder for MockLBScope. diff --git a/azure/services/managedclusters/mock_managedclusters/managedclusters_mock.go b/azure/services/managedclusters/mock_managedclusters/managedclusters_mock.go index fdcd0b87050..f95e84bca4d 100644 --- a/azure/services/managedclusters/mock_managedclusters/managedclusters_mock.go +++ b/azure/services/managedclusters/mock_managedclusters/managedclusters_mock.go @@ -44,6 +44,7 @@ import ( type MockManagedClusterScope struct { ctrl *gomock.Controller recorder *MockManagedClusterScopeMockRecorder + isgomock struct{} } // MockManagedClusterScopeMockRecorder is the mock recorder for MockManagedClusterScope. diff --git a/azure/services/natgateways/mock_natgateways/natgateways_mock.go b/azure/services/natgateways/mock_natgateways/natgateways_mock.go index c40a9ddfda2..1ba5f8d3eee 100644 --- a/azure/services/natgateways/mock_natgateways/natgateways_mock.go +++ b/azure/services/natgateways/mock_natgateways/natgateways_mock.go @@ -41,6 +41,7 @@ import ( type MockNatGatewayScope struct { ctrl *gomock.Controller recorder *MockNatGatewayScopeMockRecorder + isgomock struct{} } // MockNatGatewayScopeMockRecorder is the mock recorder for MockNatGatewayScope. diff --git a/azure/services/networkinterfaces/mock_networkinterfaces/networkinterfaces_mock.go b/azure/services/networkinterfaces/mock_networkinterfaces/networkinterfaces_mock.go index 60ebb4ba16a..903d0a42ba1 100644 --- a/azure/services/networkinterfaces/mock_networkinterfaces/networkinterfaces_mock.go +++ b/azure/services/networkinterfaces/mock_networkinterfaces/networkinterfaces_mock.go @@ -40,6 +40,7 @@ import ( type MockNICScope struct { ctrl *gomock.Controller recorder *MockNICScopeMockRecorder + isgomock struct{} } // MockNICScopeMockRecorder is the mock recorder for MockNICScope. diff --git a/azure/services/privatedns/mock_privatedns/privatedns_mock.go b/azure/services/privatedns/mock_privatedns/privatedns_mock.go index 148ab13a73e..914756fe512 100644 --- a/azure/services/privatedns/mock_privatedns/privatedns_mock.go +++ b/azure/services/privatedns/mock_privatedns/privatedns_mock.go @@ -40,6 +40,7 @@ import ( type MockScope struct { ctrl *gomock.Controller recorder *MockScopeMockRecorder + isgomock struct{} } // MockScopeMockRecorder is the mock recorder for MockScope. diff --git a/azure/services/privateendpoints/mock_privateendpoints/privateendpoints_mock.go b/azure/services/privateendpoints/mock_privateendpoints/privateendpoints_mock.go index c7522aafb89..801e5d3b283 100644 --- a/azure/services/privateendpoints/mock_privateendpoints/privateendpoints_mock.go +++ b/azure/services/privateendpoints/mock_privateendpoints/privateendpoints_mock.go @@ -41,6 +41,7 @@ import ( type MockPrivateEndpointScope struct { ctrl *gomock.Controller recorder *MockPrivateEndpointScopeMockRecorder + isgomock struct{} } // MockPrivateEndpointScopeMockRecorder is the mock recorder for MockPrivateEndpointScope. diff --git a/azure/services/publicips/mock_publicips/publicips_mock.go b/azure/services/publicips/mock_publicips/publicips_mock.go index 3d569883dc6..b22069da914 100644 --- a/azure/services/publicips/mock_publicips/publicips_mock.go +++ b/azure/services/publicips/mock_publicips/publicips_mock.go @@ -40,6 +40,7 @@ import ( type MockPublicIPScope struct { ctrl *gomock.Controller recorder *MockPublicIPScopeMockRecorder + isgomock struct{} } // MockPublicIPScopeMockRecorder is the mock recorder for MockPublicIPScope. diff --git a/azure/services/resourcehealth/mock_resourcehealth/client_mock.go b/azure/services/resourcehealth/mock_resourcehealth/client_mock.go index 9297fdaf9ff..2d0abb654b2 100644 --- a/azure/services/resourcehealth/mock_resourcehealth/client_mock.go +++ b/azure/services/resourcehealth/mock_resourcehealth/client_mock.go @@ -37,6 +37,7 @@ import ( type Mockclient struct { ctrl *gomock.Controller recorder *MockclientMockRecorder + isgomock struct{} } // MockclientMockRecorder is the mock recorder for Mockclient. diff --git a/azure/services/resourcehealth/mock_resourcehealth/resourcehealth_mock.go b/azure/services/resourcehealth/mock_resourcehealth/resourcehealth_mock.go index d82e73ca157..72210747533 100644 --- a/azure/services/resourcehealth/mock_resourcehealth/resourcehealth_mock.go +++ b/azure/services/resourcehealth/mock_resourcehealth/resourcehealth_mock.go @@ -38,6 +38,7 @@ import ( type MockResourceHealthScope struct { ctrl *gomock.Controller recorder *MockResourceHealthScopeMockRecorder + isgomock struct{} } // MockResourceHealthScopeMockRecorder is the mock recorder for MockResourceHealthScope. @@ -201,6 +202,7 @@ func (mr *MockResourceHealthScopeMockRecorder) Token() *gomock.Call { type MockAvailabilityStatusFilterer struct { ctrl *gomock.Controller recorder *MockAvailabilityStatusFiltererMockRecorder + isgomock struct{} } // MockAvailabilityStatusFiltererMockRecorder is the mock recorder for MockAvailabilityStatusFilterer. diff --git a/azure/services/resourceskus/mock_resourceskus/resourceskus_mock.go b/azure/services/resourceskus/mock_resourceskus/resourceskus_mock.go index e528a32e9ff..5f41b2acb2a 100644 --- a/azure/services/resourceskus/mock_resourceskus/resourceskus_mock.go +++ b/azure/services/resourceskus/mock_resourceskus/resourceskus_mock.go @@ -37,6 +37,7 @@ import ( type MockClient struct { ctrl *gomock.Controller recorder *MockClientMockRecorder + isgomock struct{} } // MockClientMockRecorder is the mock recorder for MockClient. diff --git a/azure/services/roleassignments/mock_roleassignments/roleassignments_mock.go b/azure/services/roleassignments/mock_roleassignments/roleassignments_mock.go index 82b641a3b3b..83f389253f2 100644 --- a/azure/services/roleassignments/mock_roleassignments/roleassignments_mock.go +++ b/azure/services/roleassignments/mock_roleassignments/roleassignments_mock.go @@ -40,6 +40,7 @@ import ( type MockRoleAssignmentScope struct { ctrl *gomock.Controller recorder *MockRoleAssignmentScopeMockRecorder + isgomock struct{} } // MockRoleAssignmentScopeMockRecorder is the mock recorder for MockRoleAssignmentScope. diff --git a/azure/services/routetables/mock_routetables/routetables_mock.go b/azure/services/routetables/mock_routetables/routetables_mock.go index a81c63edb42..38893554290 100644 --- a/azure/services/routetables/mock_routetables/routetables_mock.go +++ b/azure/services/routetables/mock_routetables/routetables_mock.go @@ -40,6 +40,7 @@ import ( type MockRouteTableScope struct { ctrl *gomock.Controller recorder *MockRouteTableScopeMockRecorder + isgomock struct{} } // MockRouteTableScopeMockRecorder is the mock recorder for MockRouteTableScope. diff --git a/azure/services/scalesets/mock_scalesets/client_mock.go b/azure/services/scalesets/mock_scalesets/client_mock.go index fdad562f8c9..82fd1d30cfc 100644 --- a/azure/services/scalesets/mock_scalesets/client_mock.go +++ b/azure/services/scalesets/mock_scalesets/client_mock.go @@ -39,6 +39,7 @@ import ( type MockClient struct { ctrl *gomock.Controller recorder *MockClientMockRecorder + isgomock struct{} } // MockClientMockRecorder is the mock recorder for MockClient. diff --git a/azure/services/scalesets/mock_scalesets/scalesets_mock.go b/azure/services/scalesets/mock_scalesets/scalesets_mock.go index 1013ac40d66..cb5611a4d83 100644 --- a/azure/services/scalesets/mock_scalesets/scalesets_mock.go +++ b/azure/services/scalesets/mock_scalesets/scalesets_mock.go @@ -41,6 +41,7 @@ import ( type MockScaleSetScope struct { ctrl *gomock.Controller recorder *MockScaleSetScopeMockRecorder + isgomock struct{} } // MockScaleSetScopeMockRecorder is the mock recorder for MockScaleSetScope. diff --git a/azure/services/scalesetvms/mock_scalesetvms/client_mock.go b/azure/services/scalesetvms/mock_scalesetvms/client_mock.go index 3ab139fc65d..bd136f18071 100644 --- a/azure/services/scalesetvms/mock_scalesetvms/client_mock.go +++ b/azure/services/scalesetvms/mock_scalesetvms/client_mock.go @@ -39,6 +39,7 @@ import ( type Mockclient struct { ctrl *gomock.Controller recorder *MockclientMockRecorder + isgomock struct{} } // MockclientMockRecorder is the mock recorder for Mockclient. diff --git a/azure/services/scalesetvms/mock_scalesetvms/scalesetvms_mock.go b/azure/services/scalesetvms/mock_scalesetvms/scalesetvms_mock.go index d58c527daf7..ad1074f2076 100644 --- a/azure/services/scalesetvms/mock_scalesetvms/scalesetvms_mock.go +++ b/azure/services/scalesetvms/mock_scalesetvms/scalesetvms_mock.go @@ -40,6 +40,7 @@ import ( type MockScaleSetVMScope struct { ctrl *gomock.Controller recorder *MockScaleSetVMScopeMockRecorder + isgomock struct{} } // MockScaleSetVMScopeMockRecorder is the mock recorder for MockScaleSetVMScope. diff --git a/azure/services/securitygroups/mock_securitygroups/securitygroups_mock.go b/azure/services/securitygroups/mock_securitygroups/securitygroups_mock.go index c8c01657f4a..14f334d31cd 100644 --- a/azure/services/securitygroups/mock_securitygroups/securitygroups_mock.go +++ b/azure/services/securitygroups/mock_securitygroups/securitygroups_mock.go @@ -40,6 +40,7 @@ import ( type MockNSGScope struct { ctrl *gomock.Controller recorder *MockNSGScopeMockRecorder + isgomock struct{} } // MockNSGScopeMockRecorder is the mock recorder for MockNSGScope. diff --git a/azure/services/subnets/mock_subnets/subnets_mock.go b/azure/services/subnets/mock_subnets/subnets_mock.go index 368b8ef2b32..250a851cd3e 100644 --- a/azure/services/subnets/mock_subnets/subnets_mock.go +++ b/azure/services/subnets/mock_subnets/subnets_mock.go @@ -41,6 +41,7 @@ import ( type MockSubnetScope struct { ctrl *gomock.Controller recorder *MockSubnetScopeMockRecorder + isgomock struct{} } // MockSubnetScopeMockRecorder is the mock recorder for MockSubnetScope. diff --git a/azure/services/tags/mock_tags/client_mock.go b/azure/services/tags/mock_tags/client_mock.go index 5e619798199..d53ab5be87e 100644 --- a/azure/services/tags/mock_tags/client_mock.go +++ b/azure/services/tags/mock_tags/client_mock.go @@ -37,6 +37,7 @@ import ( type Mockclient struct { ctrl *gomock.Controller recorder *MockclientMockRecorder + isgomock struct{} } // MockclientMockRecorder is the mock recorder for Mockclient. diff --git a/azure/services/tags/mock_tags/tags_mock.go b/azure/services/tags/mock_tags/tags_mock.go index 04806d3c32b..80983b7d598 100644 --- a/azure/services/tags/mock_tags/tags_mock.go +++ b/azure/services/tags/mock_tags/tags_mock.go @@ -37,6 +37,7 @@ import ( type MockTagScope struct { ctrl *gomock.Controller recorder *MockTagScopeMockRecorder + isgomock struct{} } // MockTagScopeMockRecorder is the mock recorder for MockTagScope. diff --git a/azure/services/virtualmachines/mock_virtualmachines/client_mock.go b/azure/services/virtualmachines/mock_virtualmachines/client_mock.go index 5c0eddac313..5f29e3261f5 100644 --- a/azure/services/virtualmachines/mock_virtualmachines/client_mock.go +++ b/azure/services/virtualmachines/mock_virtualmachines/client_mock.go @@ -39,6 +39,7 @@ import ( type MockClient struct { ctrl *gomock.Controller recorder *MockClientMockRecorder + isgomock struct{} } // MockClientMockRecorder is the mock recorder for MockClient. diff --git a/azure/services/virtualmachines/mock_virtualmachines/virtualmachines_mock.go b/azure/services/virtualmachines/mock_virtualmachines/virtualmachines_mock.go index 16fcf224834..5434c151af0 100644 --- a/azure/services/virtualmachines/mock_virtualmachines/virtualmachines_mock.go +++ b/azure/services/virtualmachines/mock_virtualmachines/virtualmachines_mock.go @@ -41,6 +41,7 @@ import ( type MockVMScope struct { ctrl *gomock.Controller recorder *MockVMScopeMockRecorder + isgomock struct{} } // MockVMScopeMockRecorder is the mock recorder for MockVMScope. diff --git a/azure/services/virtualnetworks/mock_virtualnetworks/virtualnetworks_mock.go b/azure/services/virtualnetworks/mock_virtualnetworks/virtualnetworks_mock.go index 91bd9b4d6c6..3105239e8c1 100644 --- a/azure/services/virtualnetworks/mock_virtualnetworks/virtualnetworks_mock.go +++ b/azure/services/virtualnetworks/mock_virtualnetworks/virtualnetworks_mock.go @@ -41,6 +41,7 @@ import ( type MockVNetScope struct { ctrl *gomock.Controller recorder *MockVNetScopeMockRecorder + isgomock struct{} } // MockVNetScopeMockRecorder is the mock recorder for MockVNetScope. diff --git a/azure/services/vmextensions/mock_vmextensions/vmextensions_mock.go b/azure/services/vmextensions/mock_vmextensions/vmextensions_mock.go index 5ef5879f2ef..bc2c351843e 100644 --- a/azure/services/vmextensions/mock_vmextensions/vmextensions_mock.go +++ b/azure/services/vmextensions/mock_vmextensions/vmextensions_mock.go @@ -40,6 +40,7 @@ import ( type MockVMExtensionScope struct { ctrl *gomock.Controller recorder *MockVMExtensionScopeMockRecorder + isgomock struct{} } // MockVMExtensionScopeMockRecorder is the mock recorder for MockVMExtensionScope. diff --git a/azure/services/vnetpeerings/mock_vnetpeerings/vnetpeerings_mock.go b/azure/services/vnetpeerings/mock_vnetpeerings/vnetpeerings_mock.go index 9a93aa4e53f..5de5027bc75 100644 --- a/azure/services/vnetpeerings/mock_vnetpeerings/vnetpeerings_mock.go +++ b/azure/services/vnetpeerings/mock_vnetpeerings/vnetpeerings_mock.go @@ -40,6 +40,7 @@ import ( type MockVnetPeeringScope struct { ctrl *gomock.Controller recorder *MockVnetPeeringScopeMockRecorder + isgomock struct{} } // MockVnetPeeringScopeMockRecorder is the mock recorder for MockVnetPeeringScope. diff --git a/controllers/nodelister_mock.go b/controllers/nodelister_mock.go index 67c486b5314..17f765a5db4 100644 --- a/controllers/nodelister_mock.go +++ b/controllers/nodelister_mock.go @@ -37,6 +37,7 @@ import ( type MockNodeLister struct { ctrl *gomock.Controller recorder *MockNodeListerMockRecorder + isgomock struct{} } // MockNodeListerMockRecorder is the mock recorder for MockNodeLister. diff --git a/exp/controllers/mocks/reconciler_mock.go b/exp/controllers/mocks/reconciler_mock.go index e19e08aca79..09987aeeb11 100644 --- a/exp/controllers/mocks/reconciler_mock.go +++ b/exp/controllers/mocks/reconciler_mock.go @@ -36,6 +36,7 @@ import ( type MockReconciler struct { ctrl *gomock.Controller recorder *MockReconcilerMockRecorder + isgomock struct{} } // MockReconcilerMockRecorder is the mock recorder for MockReconciler. @@ -56,29 +57,29 @@ func (m *MockReconciler) EXPECT() *MockReconcilerMockRecorder { } // Delete mocks base method. -func (m *MockReconciler) Delete(arg0 context.Context) error { +func (m *MockReconciler) Delete(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) + ret := m.ctrl.Call(m, "Delete", ctx) ret0, _ := ret[0].(error) return ret0 } // Delete indicates an expected call of Delete. -func (mr *MockReconcilerMockRecorder) Delete(arg0 any) *gomock.Call { +func (mr *MockReconcilerMockRecorder) Delete(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockReconciler)(nil).Delete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockReconciler)(nil).Delete), ctx) } // Reconcile mocks base method. -func (m *MockReconciler) Reconcile(arg0 context.Context) error { +func (m *MockReconciler) Reconcile(ctx context.Context) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Reconcile", arg0) + ret := m.ctrl.Call(m, "Reconcile", ctx) ret0, _ := ret[0].(error) return ret0 } // Reconcile indicates an expected call of Reconcile. -func (mr *MockReconcilerMockRecorder) Reconcile(arg0 any) *gomock.Call { +func (mr *MockReconcilerMockRecorder) Reconcile(ctx any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reconcile", reflect.TypeOf((*MockReconciler)(nil).Reconcile), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reconcile", reflect.TypeOf((*MockReconciler)(nil).Reconcile), ctx) } diff --git a/go.mod b/go.mod index 2f2d3758e1c..71f1d68014e 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( go.opentelemetry.io/otel/sdk v1.35.0 go.opentelemetry.io/otel/sdk/metric v1.35.0 go.opentelemetry.io/otel/trace v1.35.0 - go.uber.org/mock v0.5.1 + go.uber.org/mock v0.5.2 golang.org/x/crypto v0.37.0 golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac golang.org/x/mod v0.24.0 diff --git a/go.sum b/go.sum index f20246579b2..83de011d327 100644 --- a/go.sum +++ b/go.sum @@ -558,8 +558,8 @@ go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.5.1 h1:ASgazW/qBmR+A32MYFDB6E2POoTgOwT509VP0CT/fjs= -go.uber.org/mock v0.5.1/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= +go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= diff --git a/internal/test/mock_log/log_mock.go b/internal/test/mock_log/log_mock.go index f634ea8e860..3979cbcf184 100644 --- a/internal/test/mock_log/log_mock.go +++ b/internal/test/mock_log/log_mock.go @@ -36,6 +36,7 @@ import ( type MockLogSink struct { ctrl *gomock.Controller recorder *MockLogSinkMockRecorder + isgomock struct{} } // MockLogSinkMockRecorder is the mock recorder for MockLogSink. @@ -56,84 +57,84 @@ func (m *MockLogSink) EXPECT() *MockLogSinkMockRecorder { } // Enabled mocks base method. -func (m *MockLogSink) Enabled(arg0 int) bool { +func (m *MockLogSink) Enabled(level int) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Enabled", arg0) + ret := m.ctrl.Call(m, "Enabled", level) ret0, _ := ret[0].(bool) return ret0 } // Enabled indicates an expected call of Enabled. -func (mr *MockLogSinkMockRecorder) Enabled(arg0 any) *gomock.Call { +func (mr *MockLogSinkMockRecorder) Enabled(level any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*MockLogSink)(nil).Enabled), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enabled", reflect.TypeOf((*MockLogSink)(nil).Enabled), level) } // Error mocks base method. -func (m *MockLogSink) Error(arg0 error, arg1 string, arg2 ...any) { +func (m *MockLogSink) Error(err error, msg string, keysAndValues ...any) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{err, msg} + for _, a := range keysAndValues { varargs = append(varargs, a) } m.ctrl.Call(m, "Error", varargs...) } // Error indicates an expected call of Error. -func (mr *MockLogSinkMockRecorder) Error(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockLogSinkMockRecorder) Error(err, msg any, keysAndValues ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{err, msg}, keysAndValues...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Error", reflect.TypeOf((*MockLogSink)(nil).Error), varargs...) } // Info mocks base method. -func (m *MockLogSink) Info(arg0 int, arg1 string, arg2 ...any) { +func (m *MockLogSink) Info(level int, msg string, keysAndValues ...any) { m.ctrl.T.Helper() - varargs := []any{arg0, arg1} - for _, a := range arg2 { + varargs := []any{level, msg} + for _, a := range keysAndValues { varargs = append(varargs, a) } m.ctrl.Call(m, "Info", varargs...) } // Info indicates an expected call of Info. -func (mr *MockLogSinkMockRecorder) Info(arg0, arg1 any, arg2 ...any) *gomock.Call { +func (mr *MockLogSinkMockRecorder) Info(level, msg any, keysAndValues ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0, arg1}, arg2...) + varargs := append([]any{level, msg}, keysAndValues...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockLogSink)(nil).Info), varargs...) } // Init mocks base method. -func (m *MockLogSink) Init(arg0 logr.RuntimeInfo) { +func (m *MockLogSink) Init(info logr.RuntimeInfo) { m.ctrl.T.Helper() - m.ctrl.Call(m, "Init", arg0) + m.ctrl.Call(m, "Init", info) } // Init indicates an expected call of Init. -func (mr *MockLogSinkMockRecorder) Init(arg0 any) *gomock.Call { +func (mr *MockLogSinkMockRecorder) Init(info any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockLogSink)(nil).Init), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockLogSink)(nil).Init), info) } // WithName mocks base method. -func (m *MockLogSink) WithName(arg0 string) logr.LogSink { +func (m *MockLogSink) WithName(name string) logr.LogSink { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WithName", arg0) + ret := m.ctrl.Call(m, "WithName", name) ret0, _ := ret[0].(logr.LogSink) return ret0 } // WithName indicates an expected call of WithName. -func (mr *MockLogSinkMockRecorder) WithName(arg0 any) *gomock.Call { +func (mr *MockLogSinkMockRecorder) WithName(name any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithName", reflect.TypeOf((*MockLogSink)(nil).WithName), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithName", reflect.TypeOf((*MockLogSink)(nil).WithName), name) } // WithValues mocks base method. -func (m *MockLogSink) WithValues(arg0 ...any) logr.LogSink { +func (m *MockLogSink) WithValues(keysAndValues ...any) logr.LogSink { m.ctrl.T.Helper() varargs := []any{} - for _, a := range arg0 { + for _, a := range keysAndValues { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "WithValues", varargs...) @@ -142,7 +143,7 @@ func (m *MockLogSink) WithValues(arg0 ...any) logr.LogSink { } // WithValues indicates an expected call of WithValues. -func (mr *MockLogSinkMockRecorder) WithValues(arg0 ...any) *gomock.Call { +func (mr *MockLogSinkMockRecorder) WithValues(keysAndValues ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithValues", reflect.TypeOf((*MockLogSink)(nil).WithValues), arg0...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WithValues", reflect.TypeOf((*MockLogSink)(nil).WithValues), keysAndValues...) } diff --git a/pkg/coalescing/mocks/coalescing_mock.go b/pkg/coalescing/mocks/coalescing_mock.go index c014a97c751..b94f937967d 100644 --- a/pkg/coalescing/mocks/coalescing_mock.go +++ b/pkg/coalescing/mocks/coalescing_mock.go @@ -36,6 +36,7 @@ import ( type MockReconcileCacher struct { ctrl *gomock.Controller recorder *MockReconcileCacherMockRecorder + isgomock struct{} } // MockReconcileCacherMockRecorder is the mock recorder for MockReconcileCacher. diff --git a/pkg/coalescing/mocks/reconciler_mock.go b/pkg/coalescing/mocks/reconciler_mock.go index cd63695592c..5a0b9ed67c6 100644 --- a/pkg/coalescing/mocks/reconciler_mock.go +++ b/pkg/coalescing/mocks/reconciler_mock.go @@ -34,30 +34,31 @@ import ( ) // MockReconciler is a mock of Reconciler interface. -type MockReconciler struct { +type MockReconciler[request comparable] struct { ctrl *gomock.Controller - recorder *MockReconcilerMockRecorder + recorder *MockReconcilerMockRecorder[request] + isgomock struct{} } // MockReconcilerMockRecorder is the mock recorder for MockReconciler. -type MockReconcilerMockRecorder struct { - mock *MockReconciler +type MockReconcilerMockRecorder[request comparable] struct { + mock *MockReconciler[request] } // NewMockReconciler creates a new mock instance. -func NewMockReconciler(ctrl *gomock.Controller) *MockReconciler { - mock := &MockReconciler{ctrl: ctrl} - mock.recorder = &MockReconcilerMockRecorder{mock} +func NewMockReconciler[request comparable](ctrl *gomock.Controller) *MockReconciler[request] { + mock := &MockReconciler[request]{ctrl: ctrl} + mock.recorder = &MockReconcilerMockRecorder[request]{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockReconciler) EXPECT() *MockReconcilerMockRecorder { +func (m *MockReconciler[request]) EXPECT() *MockReconcilerMockRecorder[request] { return m.recorder } // Reconcile mocks base method. -func (m *MockReconciler) Reconcile(arg0 context.Context, arg1 reconcile.Request) (reconcile.Result, error) { +func (m *MockReconciler[request]) Reconcile(arg0 context.Context, arg1 reconcile.Request) (reconcile.Result, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Reconcile", arg0, arg1) ret0, _ := ret[0].(reconcile.Result) @@ -66,7 +67,7 @@ func (m *MockReconciler) Reconcile(arg0 context.Context, arg1 reconcile.Request) } // Reconcile indicates an expected call of Reconcile. -func (mr *MockReconcilerMockRecorder) Reconcile(arg0, arg1 any) *gomock.Call { +func (mr *MockReconcilerMockRecorder[request]) Reconcile(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reconcile", reflect.TypeOf((*MockReconciler)(nil).Reconcile), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reconcile", reflect.TypeOf((*MockReconciler[request])(nil).Reconcile), arg0, arg1) } diff --git a/util/cache/ttllru/mocks/ttllru_mock.go b/util/cache/ttllru/mocks/ttllru_mock.go index 88ffab48ffd..d34219ef3cb 100644 --- a/util/cache/ttllru/mocks/ttllru_mock.go +++ b/util/cache/ttllru/mocks/ttllru_mock.go @@ -36,6 +36,7 @@ import ( type MockCacher struct { ctrl *gomock.Controller recorder *MockCacherMockRecorder + isgomock struct{} } // MockCacherMockRecorder is the mock recorder for MockCacher. @@ -102,6 +103,7 @@ func (mr *MockCacherMockRecorder) Remove(key any) *gomock.Call { type MockPeekingCacher struct { ctrl *gomock.Controller recorder *MockPeekingCacherMockRecorder + isgomock struct{} } // MockPeekingCacherMockRecorder is the mock recorder for MockPeekingCacher.