internal/resources/providers/awslib/mock_aws_resource.go (152 lines of code) (raw):

// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // Code generated by mockery v2.53.3. DO NOT EDIT. package awslib import mock "github.com/stretchr/testify/mock" // MockAwsResource is an autogenerated mock type for the AwsResource type type MockAwsResource struct { mock.Mock } type MockAwsResource_Expecter struct { mock *mock.Mock } func (_m *MockAwsResource) EXPECT() *MockAwsResource_Expecter { return &MockAwsResource_Expecter{mock: &_m.Mock} } // GetRegion provides a mock function with no fields func (_m *MockAwsResource) GetRegion() string { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetRegion") } var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // MockAwsResource_GetRegion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegion' type MockAwsResource_GetRegion_Call struct { *mock.Call } // GetRegion is a helper method to define mock.On call func (_e *MockAwsResource_Expecter) GetRegion() *MockAwsResource_GetRegion_Call { return &MockAwsResource_GetRegion_Call{Call: _e.mock.On("GetRegion")} } func (_c *MockAwsResource_GetRegion_Call) Run(run func()) *MockAwsResource_GetRegion_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockAwsResource_GetRegion_Call) Return(_a0 string) *MockAwsResource_GetRegion_Call { _c.Call.Return(_a0) return _c } func (_c *MockAwsResource_GetRegion_Call) RunAndReturn(run func() string) *MockAwsResource_GetRegion_Call { _c.Call.Return(run) return _c } // GetResourceArn provides a mock function with no fields func (_m *MockAwsResource) GetResourceArn() string { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetResourceArn") } var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // MockAwsResource_GetResourceArn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourceArn' type MockAwsResource_GetResourceArn_Call struct { *mock.Call } // GetResourceArn is a helper method to define mock.On call func (_e *MockAwsResource_Expecter) GetResourceArn() *MockAwsResource_GetResourceArn_Call { return &MockAwsResource_GetResourceArn_Call{Call: _e.mock.On("GetResourceArn")} } func (_c *MockAwsResource_GetResourceArn_Call) Run(run func()) *MockAwsResource_GetResourceArn_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockAwsResource_GetResourceArn_Call) Return(_a0 string) *MockAwsResource_GetResourceArn_Call { _c.Call.Return(_a0) return _c } func (_c *MockAwsResource_GetResourceArn_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceArn_Call { _c.Call.Return(run) return _c } // GetResourceName provides a mock function with no fields func (_m *MockAwsResource) GetResourceName() string { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetResourceName") } var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // MockAwsResource_GetResourceName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourceName' type MockAwsResource_GetResourceName_Call struct { *mock.Call } // GetResourceName is a helper method to define mock.On call func (_e *MockAwsResource_Expecter) GetResourceName() *MockAwsResource_GetResourceName_Call { return &MockAwsResource_GetResourceName_Call{Call: _e.mock.On("GetResourceName")} } func (_c *MockAwsResource_GetResourceName_Call) Run(run func()) *MockAwsResource_GetResourceName_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockAwsResource_GetResourceName_Call) Return(_a0 string) *MockAwsResource_GetResourceName_Call { _c.Call.Return(_a0) return _c } func (_c *MockAwsResource_GetResourceName_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceName_Call { _c.Call.Return(run) return _c } // GetResourceType provides a mock function with no fields func (_m *MockAwsResource) GetResourceType() string { ret := _m.Called() if len(ret) == 0 { panic("no return value specified for GetResourceType") } var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() } else { r0 = ret.Get(0).(string) } return r0 } // MockAwsResource_GetResourceType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetResourceType' type MockAwsResource_GetResourceType_Call struct { *mock.Call } // GetResourceType is a helper method to define mock.On call func (_e *MockAwsResource_Expecter) GetResourceType() *MockAwsResource_GetResourceType_Call { return &MockAwsResource_GetResourceType_Call{Call: _e.mock.On("GetResourceType")} } func (_c *MockAwsResource_GetResourceType_Call) Run(run func()) *MockAwsResource_GetResourceType_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *MockAwsResource_GetResourceType_Call) Return(_a0 string) *MockAwsResource_GetResourceType_Call { _c.Call.Return(_a0) return _c } func (_c *MockAwsResource_GetResourceType_Call) RunAndReturn(run func() string) *MockAwsResource_GetResourceType_Call { _c.Call.Return(run) return _c } // NewMockAwsResource creates a new instance of MockAwsResource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewMockAwsResource(t interface { mock.TestingT Cleanup(func()) }) *MockAwsResource { mock := &MockAwsResource{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }