mirror of https://github.com/hashicorp/consul
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
209 lines
5.5 KiB
209 lines
5.5 KiB
// Code generated by mockery v2.38.0. DO NOT EDIT. |
|
|
|
package hcp |
|
|
|
import ( |
|
client "github.com/hashicorp/consul/agent/hcp/client" |
|
config "github.com/hashicorp/consul/agent/hcp/config" |
|
|
|
context "context" |
|
|
|
mock "github.com/stretchr/testify/mock" |
|
) |
|
|
|
// MockManager is an autogenerated mock type for the Manager type |
|
type MockManager struct { |
|
mock.Mock |
|
} |
|
|
|
type MockManager_Expecter struct { |
|
mock *mock.Mock |
|
} |
|
|
|
func (_m *MockManager) EXPECT() *MockManager_Expecter { |
|
return &MockManager_Expecter{mock: &_m.Mock} |
|
} |
|
|
|
// GetCloudConfig provides a mock function with given fields: |
|
func (_m *MockManager) GetCloudConfig() config.CloudConfig { |
|
ret := _m.Called() |
|
|
|
if len(ret) == 0 { |
|
panic("no return value specified for GetCloudConfig") |
|
} |
|
|
|
var r0 config.CloudConfig |
|
if rf, ok := ret.Get(0).(func() config.CloudConfig); ok { |
|
r0 = rf() |
|
} else { |
|
r0 = ret.Get(0).(config.CloudConfig) |
|
} |
|
|
|
return r0 |
|
} |
|
|
|
// MockManager_GetCloudConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCloudConfig' |
|
type MockManager_GetCloudConfig_Call struct { |
|
*mock.Call |
|
} |
|
|
|
// GetCloudConfig is a helper method to define mock.On call |
|
func (_e *MockManager_Expecter) GetCloudConfig() *MockManager_GetCloudConfig_Call { |
|
return &MockManager_GetCloudConfig_Call{Call: _e.mock.On("GetCloudConfig")} |
|
} |
|
|
|
func (_c *MockManager_GetCloudConfig_Call) Run(run func()) *MockManager_GetCloudConfig_Call { |
|
_c.Call.Run(func(args mock.Arguments) { |
|
run() |
|
}) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_GetCloudConfig_Call) Return(_a0 config.CloudConfig) *MockManager_GetCloudConfig_Call { |
|
_c.Call.Return(_a0) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_GetCloudConfig_Call) RunAndReturn(run func() config.CloudConfig) *MockManager_GetCloudConfig_Call { |
|
_c.Call.Return(run) |
|
return _c |
|
} |
|
|
|
// Start provides a mock function with given fields: _a0 |
|
func (_m *MockManager) Start(_a0 context.Context) error { |
|
ret := _m.Called(_a0) |
|
|
|
if len(ret) == 0 { |
|
panic("no return value specified for Start") |
|
} |
|
|
|
var r0 error |
|
if rf, ok := ret.Get(0).(func(context.Context) error); ok { |
|
r0 = rf(_a0) |
|
} else { |
|
r0 = ret.Error(0) |
|
} |
|
|
|
return r0 |
|
} |
|
|
|
// MockManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' |
|
type MockManager_Start_Call struct { |
|
*mock.Call |
|
} |
|
|
|
// Start is a helper method to define mock.On call |
|
// - _a0 context.Context |
|
func (_e *MockManager_Expecter) Start(_a0 interface{}) *MockManager_Start_Call { |
|
return &MockManager_Start_Call{Call: _e.mock.On("Start", _a0)} |
|
} |
|
|
|
func (_c *MockManager_Start_Call) Run(run func(_a0 context.Context)) *MockManager_Start_Call { |
|
_c.Call.Run(func(args mock.Arguments) { |
|
run(args[0].(context.Context)) |
|
}) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_Start_Call) Return(_a0 error) *MockManager_Start_Call { |
|
_c.Call.Return(_a0) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_Start_Call) RunAndReturn(run func(context.Context) error) *MockManager_Start_Call { |
|
_c.Call.Return(run) |
|
return _c |
|
} |
|
|
|
// Stop provides a mock function with given fields: |
|
func (_m *MockManager) Stop() error { |
|
ret := _m.Called() |
|
|
|
if len(ret) == 0 { |
|
panic("no return value specified for Stop") |
|
} |
|
|
|
var r0 error |
|
if rf, ok := ret.Get(0).(func() error); ok { |
|
r0 = rf() |
|
} else { |
|
r0 = ret.Error(0) |
|
} |
|
|
|
return r0 |
|
} |
|
|
|
// MockManager_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' |
|
type MockManager_Stop_Call struct { |
|
*mock.Call |
|
} |
|
|
|
// Stop is a helper method to define mock.On call |
|
func (_e *MockManager_Expecter) Stop() *MockManager_Stop_Call { |
|
return &MockManager_Stop_Call{Call: _e.mock.On("Stop")} |
|
} |
|
|
|
func (_c *MockManager_Stop_Call) Run(run func()) *MockManager_Stop_Call { |
|
_c.Call.Run(func(args mock.Arguments) { |
|
run() |
|
}) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_Stop_Call) Return(_a0 error) *MockManager_Stop_Call { |
|
_c.Call.Return(_a0) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_Stop_Call) RunAndReturn(run func() error) *MockManager_Stop_Call { |
|
_c.Call.Return(run) |
|
return _c |
|
} |
|
|
|
// UpdateConfig provides a mock function with given fields: _a0, _a1 |
|
func (_m *MockManager) UpdateConfig(_a0 client.Client, _a1 config.CloudConfig) { |
|
_m.Called(_a0, _a1) |
|
} |
|
|
|
// MockManager_UpdateConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConfig' |
|
type MockManager_UpdateConfig_Call struct { |
|
*mock.Call |
|
} |
|
|
|
// UpdateConfig is a helper method to define mock.On call |
|
// - _a0 client.Client |
|
// - _a1 config.CloudConfig |
|
func (_e *MockManager_Expecter) UpdateConfig(_a0 interface{}, _a1 interface{}) *MockManager_UpdateConfig_Call { |
|
return &MockManager_UpdateConfig_Call{Call: _e.mock.On("UpdateConfig", _a0, _a1)} |
|
} |
|
|
|
func (_c *MockManager_UpdateConfig_Call) Run(run func(_a0 client.Client, _a1 config.CloudConfig)) *MockManager_UpdateConfig_Call { |
|
_c.Call.Run(func(args mock.Arguments) { |
|
run(args[0].(client.Client), args[1].(config.CloudConfig)) |
|
}) |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_UpdateConfig_Call) Return() *MockManager_UpdateConfig_Call { |
|
_c.Call.Return() |
|
return _c |
|
} |
|
|
|
func (_c *MockManager_UpdateConfig_Call) RunAndReturn(run func(client.Client, config.CloudConfig)) *MockManager_UpdateConfig_Call { |
|
_c.Call.Return(run) |
|
return _c |
|
} |
|
|
|
// NewMockManager creates a new instance of MockManager. 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 NewMockManager(t interface { |
|
mock.TestingT |
|
Cleanup(func()) |
|
}) *MockManager { |
|
mock := &MockManager{} |
|
mock.Mock.Test(t) |
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) }) |
|
|
|
return mock |
|
}
|
|
|