diff --git a/pkg/util/azureclient/azuresdk/armnetwork/generate.go b/pkg/util/azureclient/azuresdk/armnetwork/generate.go index a2029abccb2..2279242dfe5 100644 --- a/pkg/util/azureclient/azuresdk/armnetwork/generate.go +++ b/pkg/util/azureclient/azuresdk/armnetwork/generate.go @@ -4,5 +4,5 @@ package armnetwork // Licensed under the Apache License 2.0. //go:generate rm -rf ../../../../util/mocks/$GOPACKAGE -//go:generate go run ../../../../../vendor/github.com/golang/mock/mockgen -destination=../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/$GOPACKAGE InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient +//go:generate go run ../../../../../vendor/github.com/golang/mock/mockgen -destination=../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/$GOPACKAGE InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient,SubnetsClient //go:generate go run ../../../../../vendor/golang.org/x/tools/cmd/goimports -local=github.com/Azure/ARO-RP -e -w ../../../../util/mocks/azureclient/azuresdk/$GOPACKAGE/$GOPACKAGE.go diff --git a/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go b/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go index d74b941d25a..f57ee3ddfb8 100644 --- a/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go +++ b/pkg/util/mocks/azureclient/azuresdk/armnetwork/armnetwork.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/armnetwork (interfaces: InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient) +// Source: github.com/Azure/ARO-RP/pkg/util/azureclient/azuresdk/armnetwork (interfaces: InterfacesClient,LoadBalancersClient,LoadBalancerBackendAddressPoolsClient,PrivateEndpointsClient,PrivateLinkServicesClient,PublicIPAddressesClient,SecurityGroupsClient,SubnetsClient) // Package mock_armnetwork is a generated GoMock package. package mock_armnetwork @@ -477,3 +477,69 @@ func (mr *MockSecurityGroupsClientMockRecorder) List(arg0, arg1, arg2 interface{ mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockSecurityGroupsClient)(nil).List), arg0, arg1, arg2) } + +// MockSubnetsClient is a mock of SubnetsClient interface. +type MockSubnetsClient struct { + ctrl *gomock.Controller + recorder *MockSubnetsClientMockRecorder +} + +// MockSubnetsClientMockRecorder is the mock recorder for MockSubnetsClient. +type MockSubnetsClientMockRecorder struct { + mock *MockSubnetsClient +} + +// NewMockSubnetsClient creates a new mock instance. +func NewMockSubnetsClient(ctrl *gomock.Controller) *MockSubnetsClient { + mock := &MockSubnetsClient{ctrl: ctrl} + mock.recorder = &MockSubnetsClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockSubnetsClient) EXPECT() *MockSubnetsClientMockRecorder { + return m.recorder +} + +// CreateOrUpdateAndWait mocks base method. +func (m *MockSubnetsClient) CreateOrUpdateAndWait(arg0 context.Context, arg1, arg2, arg3 string, arg4 armnetwork.Subnet, arg5 *armnetwork.SubnetsClientBeginCreateOrUpdateOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CreateOrUpdateAndWait", arg0, arg1, arg2, arg3, arg4, arg5) + ret0, _ := ret[0].(error) + return ret0 +} + +// CreateOrUpdateAndWait indicates an expected call of CreateOrUpdateAndWait. +func (mr *MockSubnetsClientMockRecorder) CreateOrUpdateAndWait(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateAndWait", reflect.TypeOf((*MockSubnetsClient)(nil).CreateOrUpdateAndWait), arg0, arg1, arg2, arg3, arg4, arg5) +} + +// DeleteAndWait mocks base method. +func (m *MockSubnetsClient) DeleteAndWait(arg0 context.Context, arg1, arg2, arg3 string, arg4 *armnetwork.SubnetsClientBeginDeleteOptions) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteAndWait", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteAndWait indicates an expected call of DeleteAndWait. +func (mr *MockSubnetsClientMockRecorder) DeleteAndWait(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAndWait", reflect.TypeOf((*MockSubnetsClient)(nil).DeleteAndWait), arg0, arg1, arg2, arg3, arg4) +} + +// Get mocks base method. +func (m *MockSubnetsClient) Get(arg0 context.Context, arg1, arg2, arg3 string, arg4 *armnetwork.SubnetsClientGetOptions) (armnetwork.SubnetsClientGetResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2, arg3, arg4) + ret0, _ := ret[0].(armnetwork.SubnetsClientGetResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get. +func (mr *MockSubnetsClientMockRecorder) Get(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSubnetsClient)(nil).Get), arg0, arg1, arg2, arg3, arg4) +} diff --git a/pkg/util/mocks/azureclient/azuresdk/armnetwork/subnets.go b/pkg/util/mocks/azureclient/azuresdk/armnetwork/subnets.go deleted file mode 100644 index d12b9f66a60..00000000000 --- a/pkg/util/mocks/azureclient/azuresdk/armnetwork/subnets.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: pkg/util/azureclient/azuresdk/armnetwork/subnets.go - -// Package mock_armnetwork is a generated GoMock package. -package mock_armnetwork - -import ( - context "context" - reflect "reflect" - - armnetwork "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" - gomock "github.com/golang/mock/gomock" -) - -// MockSubnetsClient is a mock of SubnetsClient interface. -type MockSubnetsClient struct { - ctrl *gomock.Controller - recorder *MockSubnetsClientMockRecorder -} - -// MockSubnetsClientMockRecorder is the mock recorder for MockSubnetsClient. -type MockSubnetsClientMockRecorder struct { - mock *MockSubnetsClient -} - -// NewMockSubnetsClient creates a new mock instance. -func NewMockSubnetsClient(ctrl *gomock.Controller) *MockSubnetsClient { - mock := &MockSubnetsClient{ctrl: ctrl} - mock.recorder = &MockSubnetsClientMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockSubnetsClient) EXPECT() *MockSubnetsClientMockRecorder { - return m.recorder -} - -// Get mocks base method. -func (m *MockSubnetsClient) Get(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, options *armnetwork.SubnetsClientGetOptions) (armnetwork.SubnetsClientGetResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, virtualNetworkName, subnetName, options) - ret0, _ := ret[0].(armnetwork.SubnetsClientGetResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Get indicates an expected call of Get. -func (mr *MockSubnetsClientMockRecorder) Get(ctx, resourceGroupName, virtualNetworkName, subnetName, options interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSubnetsClient)(nil).Get), ctx, resourceGroupName, virtualNetworkName, subnetName, options) -} diff --git a/pkg/util/mocks/subnet/subnet.go b/pkg/util/mocks/subnet/subnet.go index 92baafb5427..9ebce24ec4e 100644 --- a/pkg/util/mocks/subnet/subnet.go +++ b/pkg/util/mocks/subnet/subnet.go @@ -51,20 +51,6 @@ func (mr *MockManagerMockRecorder) CreateOrUpdate(arg0, arg1, arg2 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockManager)(nil).CreateOrUpdate), arg0, arg1, arg2) } -// CreateOrUpdateFromIds mocks base method. -func (m *MockManager) CreateOrUpdateFromIds(arg0 context.Context, arg1 []string, arg2 bool) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateOrUpdateFromIds", arg0, arg1, arg2) - ret0, _ := ret[0].(error) - return ret0 -} - -// CreateOrUpdateFromIds indicates an expected call of CreateOrUpdateFromIds. -func (mr *MockManagerMockRecorder) CreateOrUpdateFromIds(arg0, arg1, arg2 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateFromIds", reflect.TypeOf((*MockManager)(nil).CreateOrUpdateFromIds), arg0, arg1, arg2) -} - // Get mocks base method. func (m *MockManager) Get(arg0 context.Context, arg1 string) (*network.Subnet, error) { m.ctrl.T.Helper()