internal/resources/providers/awslib/lambda/mock_lambda.go (200 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 lambda import ( context "context" awslib "github.com/elastic/cloudbeat/internal/resources/providers/awslib" mock "github.com/stretchr/testify/mock" ) // MockLambda is an autogenerated mock type for the Lambda type type MockLambda struct { mock.Mock } type MockLambda_Expecter struct { mock *mock.Mock } func (_m *MockLambda) EXPECT() *MockLambda_Expecter { return &MockLambda_Expecter{mock: &_m.Mock} } // ListAliases provides a mock function with given fields: _a0 func (_m *MockLambda) ListAliases(_a0 context.Context) ([]awslib.AwsResource, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ListAliases") } var r0 []awslib.AwsResource var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]awslib.AwsResource, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(context.Context) []awslib.AwsResource); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]awslib.AwsResource) } } if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // MockLambda_ListAliases_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListAliases' type MockLambda_ListAliases_Call struct { *mock.Call } // ListAliases is a helper method to define mock.On call // - _a0 context.Context func (_e *MockLambda_Expecter) ListAliases(_a0 interface{}) *MockLambda_ListAliases_Call { return &MockLambda_ListAliases_Call{Call: _e.mock.On("ListAliases", _a0)} } func (_c *MockLambda_ListAliases_Call) Run(run func(_a0 context.Context)) *MockLambda_ListAliases_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *MockLambda_ListAliases_Call) Return(_a0 []awslib.AwsResource, _a1 error) *MockLambda_ListAliases_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockLambda_ListAliases_Call) RunAndReturn(run func(context.Context) ([]awslib.AwsResource, error)) *MockLambda_ListAliases_Call { _c.Call.Return(run) return _c } // ListEventSourceMappings provides a mock function with given fields: _a0 func (_m *MockLambda) ListEventSourceMappings(_a0 context.Context) ([]awslib.AwsResource, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ListEventSourceMappings") } var r0 []awslib.AwsResource var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]awslib.AwsResource, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(context.Context) []awslib.AwsResource); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]awslib.AwsResource) } } if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // MockLambda_ListEventSourceMappings_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListEventSourceMappings' type MockLambda_ListEventSourceMappings_Call struct { *mock.Call } // ListEventSourceMappings is a helper method to define mock.On call // - _a0 context.Context func (_e *MockLambda_Expecter) ListEventSourceMappings(_a0 interface{}) *MockLambda_ListEventSourceMappings_Call { return &MockLambda_ListEventSourceMappings_Call{Call: _e.mock.On("ListEventSourceMappings", _a0)} } func (_c *MockLambda_ListEventSourceMappings_Call) Run(run func(_a0 context.Context)) *MockLambda_ListEventSourceMappings_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *MockLambda_ListEventSourceMappings_Call) Return(_a0 []awslib.AwsResource, _a1 error) *MockLambda_ListEventSourceMappings_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockLambda_ListEventSourceMappings_Call) RunAndReturn(run func(context.Context) ([]awslib.AwsResource, error)) *MockLambda_ListEventSourceMappings_Call { _c.Call.Return(run) return _c } // ListFunctions provides a mock function with given fields: _a0 func (_m *MockLambda) ListFunctions(_a0 context.Context) ([]awslib.AwsResource, error) { ret := _m.Called(_a0) if len(ret) == 0 { panic("no return value specified for ListFunctions") } var r0 []awslib.AwsResource var r1 error if rf, ok := ret.Get(0).(func(context.Context) ([]awslib.AwsResource, error)); ok { return rf(_a0) } if rf, ok := ret.Get(0).(func(context.Context) []awslib.AwsResource); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]awslib.AwsResource) } } if rf, ok := ret.Get(1).(func(context.Context) error); ok { r1 = rf(_a0) } else { r1 = ret.Error(1) } return r0, r1 } // MockLambda_ListFunctions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListFunctions' type MockLambda_ListFunctions_Call struct { *mock.Call } // ListFunctions is a helper method to define mock.On call // - _a0 context.Context func (_e *MockLambda_Expecter) ListFunctions(_a0 interface{}) *MockLambda_ListFunctions_Call { return &MockLambda_ListFunctions_Call{Call: _e.mock.On("ListFunctions", _a0)} } func (_c *MockLambda_ListFunctions_Call) Run(run func(_a0 context.Context)) *MockLambda_ListFunctions_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context)) }) return _c } func (_c *MockLambda_ListFunctions_Call) Return(_a0 []awslib.AwsResource, _a1 error) *MockLambda_ListFunctions_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockLambda_ListFunctions_Call) RunAndReturn(run func(context.Context) ([]awslib.AwsResource, error)) *MockLambda_ListFunctions_Call { _c.Call.Return(run) return _c } // ListLayers provides a mock function with given fields: _a0, _a1, _a2 func (_m *MockLambda) ListLayers(_a0 context.Context, _a1 string, _a2 string) ([]awslib.AwsResource, error) { ret := _m.Called(_a0, _a1, _a2) if len(ret) == 0 { panic("no return value specified for ListLayers") } var r0 []awslib.AwsResource var r1 error if rf, ok := ret.Get(0).(func(context.Context, string, string) ([]awslib.AwsResource, error)); ok { return rf(_a0, _a1, _a2) } if rf, ok := ret.Get(0).(func(context.Context, string, string) []awslib.AwsResource); ok { r0 = rf(_a0, _a1, _a2) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]awslib.AwsResource) } } if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = rf(_a0, _a1, _a2) } else { r1 = ret.Error(1) } return r0, r1 } // MockLambda_ListLayers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLayers' type MockLambda_ListLayers_Call struct { *mock.Call } // ListLayers is a helper method to define mock.On call // - _a0 context.Context // - _a1 string // - _a2 string func (_e *MockLambda_Expecter) ListLayers(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockLambda_ListLayers_Call { return &MockLambda_ListLayers_Call{Call: _e.mock.On("ListLayers", _a0, _a1, _a2)} } func (_c *MockLambda_ListLayers_Call) Run(run func(_a0 context.Context, _a1 string, _a2 string)) *MockLambda_ListLayers_Call { _c.Call.Run(func(args mock.Arguments) { run(args[0].(context.Context), args[1].(string), args[2].(string)) }) return _c } func (_c *MockLambda_ListLayers_Call) Return(_a0 []awslib.AwsResource, _a1 error) *MockLambda_ListLayers_Call { _c.Call.Return(_a0, _a1) return _c } func (_c *MockLambda_ListLayers_Call) RunAndReturn(run func(context.Context, string, string) ([]awslib.AwsResource, error)) *MockLambda_ListLayers_Call { _c.Call.Return(run) return _c } // NewMockLambda creates a new instance of MockLambda. 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 NewMockLambda(t interface { mock.TestingT Cleanup(func()) }) *MockLambda { mock := &MockLambda{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }