mirror of https://github.com/status-im/consul.git
116 lines
3.2 KiB
Go
116 lines
3.2 KiB
Go
// Code generated by mockery v2.38.0. DO NOT EDIT.
|
|
|
|
package hcp
|
|
|
|
import (
|
|
context "context"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// MockTelemetryProvider is an autogenerated mock type for the TelemetryProvider type
|
|
type MockTelemetryProvider struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockTelemetryProvider_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockTelemetryProvider) EXPECT() *MockTelemetryProvider_Expecter {
|
|
return &MockTelemetryProvider_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Start provides a mock function with given fields: ctx, c
|
|
func (_m *MockTelemetryProvider) Start(ctx context.Context, c *HCPProviderCfg) error {
|
|
ret := _m.Called(ctx, c)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Start")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *HCPProviderCfg) error); ok {
|
|
r0 = rf(ctx, c)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockTelemetryProvider_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
|
|
type MockTelemetryProvider_Start_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Start is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - c *HCPProviderCfg
|
|
func (_e *MockTelemetryProvider_Expecter) Start(ctx interface{}, c interface{}) *MockTelemetryProvider_Start_Call {
|
|
return &MockTelemetryProvider_Start_Call{Call: _e.mock.On("Start", ctx, c)}
|
|
}
|
|
|
|
func (_c *MockTelemetryProvider_Start_Call) Run(run func(ctx context.Context, c *HCPProviderCfg)) *MockTelemetryProvider_Start_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(*HCPProviderCfg))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockTelemetryProvider_Start_Call) Return(_a0 error) *MockTelemetryProvider_Start_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockTelemetryProvider_Start_Call) RunAndReturn(run func(context.Context, *HCPProviderCfg) error) *MockTelemetryProvider_Start_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Stop provides a mock function with given fields:
|
|
func (_m *MockTelemetryProvider) Stop() {
|
|
_m.Called()
|
|
}
|
|
|
|
// MockTelemetryProvider_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
|
|
type MockTelemetryProvider_Stop_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Stop is a helper method to define mock.On call
|
|
func (_e *MockTelemetryProvider_Expecter) Stop() *MockTelemetryProvider_Stop_Call {
|
|
return &MockTelemetryProvider_Stop_Call{Call: _e.mock.On("Stop")}
|
|
}
|
|
|
|
func (_c *MockTelemetryProvider_Stop_Call) Run(run func()) *MockTelemetryProvider_Stop_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockTelemetryProvider_Stop_Call) Return() *MockTelemetryProvider_Stop_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockTelemetryProvider_Stop_Call) RunAndReturn(run func()) *MockTelemetryProvider_Stop_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockTelemetryProvider creates a new instance of MockTelemetryProvider. 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 NewMockTelemetryProvider(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockTelemetryProvider {
|
|
mock := &MockTelemetryProvider{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|