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.
consul/agent/hcp/client/mock_Client.go

379 lines
11 KiB

// Code generated by mockery v2.39.2. DO NOT EDIT.
package client
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// MockClient is an autogenerated mock type for the Client type
type MockClient struct {
mock.Mock
}
type MockClient_Expecter struct {
mock *mock.Mock
}
func (_m *MockClient) EXPECT() *MockClient_Expecter {
return &MockClient_Expecter{mock: &_m.Mock}
}
// DiscoverServers provides a mock function with given fields: ctx
func (_m *MockClient) DiscoverServers(ctx context.Context) ([]string, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for DiscoverServers")
}
var r0 []string
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]string, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []string); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_DiscoverServers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DiscoverServers'
type MockClient_DiscoverServers_Call struct {
*mock.Call
}
// DiscoverServers is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockClient_Expecter) DiscoverServers(ctx interface{}) *MockClient_DiscoverServers_Call {
return &MockClient_DiscoverServers_Call{Call: _e.mock.On("DiscoverServers", ctx)}
}
func (_c *MockClient_DiscoverServers_Call) Run(run func(ctx context.Context)) *MockClient_DiscoverServers_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockClient_DiscoverServers_Call) Return(_a0 []string, _a1 error) *MockClient_DiscoverServers_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_DiscoverServers_Call) RunAndReturn(run func(context.Context) ([]string, error)) *MockClient_DiscoverServers_Call {
_c.Call.Return(run)
return _c
}
// FetchBootstrap provides a mock function with given fields: ctx
func (_m *MockClient) FetchBootstrap(ctx context.Context) (*BootstrapConfig, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for FetchBootstrap")
}
var r0 *BootstrapConfig
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*BootstrapConfig, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *BootstrapConfig); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*BootstrapConfig)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_FetchBootstrap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FetchBootstrap'
type MockClient_FetchBootstrap_Call struct {
*mock.Call
}
// FetchBootstrap is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockClient_Expecter) FetchBootstrap(ctx interface{}) *MockClient_FetchBootstrap_Call {
return &MockClient_FetchBootstrap_Call{Call: _e.mock.On("FetchBootstrap", ctx)}
}
func (_c *MockClient_FetchBootstrap_Call) Run(run func(ctx context.Context)) *MockClient_FetchBootstrap_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockClient_FetchBootstrap_Call) Return(_a0 *BootstrapConfig, _a1 error) *MockClient_FetchBootstrap_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_FetchBootstrap_Call) RunAndReturn(run func(context.Context) (*BootstrapConfig, error)) *MockClient_FetchBootstrap_Call {
_c.Call.Return(run)
return _c
}
// FetchTelemetryConfig provides a mock function with given fields: ctx
func (_m *MockClient) FetchTelemetryConfig(ctx context.Context) (*TelemetryConfig, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for FetchTelemetryConfig")
}
var r0 *TelemetryConfig
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*TelemetryConfig, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *TelemetryConfig); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*TelemetryConfig)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_FetchTelemetryConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FetchTelemetryConfig'
type MockClient_FetchTelemetryConfig_Call struct {
*mock.Call
}
// FetchTelemetryConfig is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockClient_Expecter) FetchTelemetryConfig(ctx interface{}) *MockClient_FetchTelemetryConfig_Call {
return &MockClient_FetchTelemetryConfig_Call{Call: _e.mock.On("FetchTelemetryConfig", ctx)}
}
func (_c *MockClient_FetchTelemetryConfig_Call) Run(run func(ctx context.Context)) *MockClient_FetchTelemetryConfig_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockClient_FetchTelemetryConfig_Call) Return(_a0 *TelemetryConfig, _a1 error) *MockClient_FetchTelemetryConfig_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_FetchTelemetryConfig_Call) RunAndReturn(run func(context.Context) (*TelemetryConfig, error)) *MockClient_FetchTelemetryConfig_Call {
_c.Call.Return(run)
return _c
}
// GetCluster provides a mock function with given fields: ctx
func (_m *MockClient) GetCluster(ctx context.Context) (*Cluster, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetCluster")
}
var r0 *Cluster
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) (*Cluster, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) *Cluster); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*Cluster)
}
}
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// MockClient_GetCluster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCluster'
type MockClient_GetCluster_Call struct {
*mock.Call
}
// GetCluster is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockClient_Expecter) GetCluster(ctx interface{}) *MockClient_GetCluster_Call {
return &MockClient_GetCluster_Call{Call: _e.mock.On("GetCluster", ctx)}
}
func (_c *MockClient_GetCluster_Call) Run(run func(ctx context.Context)) *MockClient_GetCluster_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockClient_GetCluster_Call) Return(_a0 *Cluster, _a1 error) *MockClient_GetCluster_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *MockClient_GetCluster_Call) RunAndReturn(run func(context.Context) (*Cluster, error)) *MockClient_GetCluster_Call {
_c.Call.Return(run)
return _c
}
// GetObservabilitySecret provides a mock function with given fields: ctx
func (_m *MockClient) GetObservabilitySecret(ctx context.Context) (string, string, error) {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for GetObservabilitySecret")
}
var r0 string
var r1 string
var r2 error
if rf, ok := ret.Get(0).(func(context.Context) (string, string, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) string); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(context.Context) string); ok {
r1 = rf(ctx)
} else {
r1 = ret.Get(1).(string)
}
if rf, ok := ret.Get(2).(func(context.Context) error); ok {
r2 = rf(ctx)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// MockClient_GetObservabilitySecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObservabilitySecret'
type MockClient_GetObservabilitySecret_Call struct {
*mock.Call
}
// GetObservabilitySecret is a helper method to define mock.On call
// - ctx context.Context
func (_e *MockClient_Expecter) GetObservabilitySecret(ctx interface{}) *MockClient_GetObservabilitySecret_Call {
return &MockClient_GetObservabilitySecret_Call{Call: _e.mock.On("GetObservabilitySecret", ctx)}
}
func (_c *MockClient_GetObservabilitySecret_Call) Run(run func(ctx context.Context)) *MockClient_GetObservabilitySecret_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *MockClient_GetObservabilitySecret_Call) Return(clientID string, clientSecret string, err error) *MockClient_GetObservabilitySecret_Call {
_c.Call.Return(clientID, clientSecret, err)
return _c
}
func (_c *MockClient_GetObservabilitySecret_Call) RunAndReturn(run func(context.Context) (string, string, error)) *MockClient_GetObservabilitySecret_Call {
_c.Call.Return(run)
return _c
}
// PushServerStatus provides a mock function with given fields: ctx, status
func (_m *MockClient) PushServerStatus(ctx context.Context, status *ServerStatus) error {
ret := _m.Called(ctx, status)
if len(ret) == 0 {
panic("no return value specified for PushServerStatus")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *ServerStatus) error); ok {
r0 = rf(ctx, status)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockClient_PushServerStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PushServerStatus'
type MockClient_PushServerStatus_Call struct {
*mock.Call
}
// PushServerStatus is a helper method to define mock.On call
// - ctx context.Context
// - status *ServerStatus
func (_e *MockClient_Expecter) PushServerStatus(ctx interface{}, status interface{}) *MockClient_PushServerStatus_Call {
return &MockClient_PushServerStatus_Call{Call: _e.mock.On("PushServerStatus", ctx, status)}
}
func (_c *MockClient_PushServerStatus_Call) Run(run func(ctx context.Context, status *ServerStatus)) *MockClient_PushServerStatus_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*ServerStatus))
})
return _c
}
func (_c *MockClient_PushServerStatus_Call) Return(_a0 error) *MockClient_PushServerStatus_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockClient_PushServerStatus_Call) RunAndReturn(run func(context.Context, *ServerStatus) error) *MockClient_PushServerStatus_Call {
_c.Call.Return(run)
return _c
}
// NewMockClient creates a new instance of MockClient. 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 NewMockClient(t interface {
mock.TestingT
Cleanup(func())
}) *MockClient {
mock := &MockClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}