mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:40:17 +00:00
d6477a484f
* Rename yml to yaml extensions Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Update Docker project name Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Update SMQ YAML files Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Update Mockery Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Update Mockery version Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Remove mocks before running Mockery Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Update check order Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> * Fix tests Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com> --------- Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
752 lines
27 KiB
Go
752 lines
27 KiB
Go
// Code generated by mockery; DO NOT EDIT.
|
|
// github.com/vektra/mockery
|
|
// template: testify
|
|
|
|
package bootstrap
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/absmach/magistrala/bootstrap"
|
|
"github.com/absmach/supermq/pkg/authn"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// NewMockService creates a new instance of MockService. 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 NewMockService(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockService {
|
|
mock := &MockService{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|
|
|
|
// MockService is an autogenerated mock type for the Service type
|
|
type MockService struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockService_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockService) EXPECT() *MockService_Expecter {
|
|
return &MockService_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Add provides a mock function for the type MockService
|
|
func (_mock *MockService) Add(ctx context.Context, session authn.Session, token string, cfg bootstrap.Config) (bootstrap.Config, error) {
|
|
ret := _mock.Called(ctx, session, token, cfg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Add")
|
|
}
|
|
|
|
var r0 bootstrap.Config
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, bootstrap.Config) (bootstrap.Config, error)); ok {
|
|
return returnFunc(ctx, session, token, cfg)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, bootstrap.Config) bootstrap.Config); ok {
|
|
r0 = returnFunc(ctx, session, token, cfg)
|
|
} else {
|
|
r0 = ret.Get(0).(bootstrap.Config)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string, bootstrap.Config) error); ok {
|
|
r1 = returnFunc(ctx, session, token, cfg)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockService_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
|
|
type MockService_Add_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Add is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - token
|
|
// - cfg
|
|
func (_e *MockService_Expecter) Add(ctx interface{}, session interface{}, token interface{}, cfg interface{}) *MockService_Add_Call {
|
|
return &MockService_Add_Call{Call: _e.mock.On("Add", ctx, session, token, cfg)}
|
|
}
|
|
|
|
func (_c *MockService_Add_Call) Run(run func(ctx context.Context, session authn.Session, token string, cfg bootstrap.Config)) *MockService_Add_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(bootstrap.Config))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Add_Call) Return(config bootstrap.Config, err error) *MockService_Add_Call {
|
|
_c.Call.Return(config, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Add_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, token string, cfg bootstrap.Config) (bootstrap.Config, error)) *MockService_Add_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Bootstrap provides a mock function for the type MockService
|
|
func (_mock *MockService) Bootstrap(ctx context.Context, externalKey string, externalID string, secure bool) (bootstrap.Config, error) {
|
|
ret := _mock.Called(ctx, externalKey, externalID, secure)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Bootstrap")
|
|
}
|
|
|
|
var r0 bootstrap.Config
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool) (bootstrap.Config, error)); ok {
|
|
return returnFunc(ctx, externalKey, externalID, secure)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool) bootstrap.Config); ok {
|
|
r0 = returnFunc(ctx, externalKey, externalID, secure)
|
|
} else {
|
|
r0 = ret.Get(0).(bootstrap.Config)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, bool) error); ok {
|
|
r1 = returnFunc(ctx, externalKey, externalID, secure)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockService_Bootstrap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bootstrap'
|
|
type MockService_Bootstrap_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Bootstrap is a helper method to define mock.On call
|
|
// - ctx
|
|
// - externalKey
|
|
// - externalID
|
|
// - secure
|
|
func (_e *MockService_Expecter) Bootstrap(ctx interface{}, externalKey interface{}, externalID interface{}, secure interface{}) *MockService_Bootstrap_Call {
|
|
return &MockService_Bootstrap_Call{Call: _e.mock.On("Bootstrap", ctx, externalKey, externalID, secure)}
|
|
}
|
|
|
|
func (_c *MockService_Bootstrap_Call) Run(run func(ctx context.Context, externalKey string, externalID string, secure bool)) *MockService_Bootstrap_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(bool))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Bootstrap_Call) Return(config bootstrap.Config, err error) *MockService_Bootstrap_Call {
|
|
_c.Call.Return(config, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Bootstrap_Call) RunAndReturn(run func(ctx context.Context, externalKey string, externalID string, secure bool) (bootstrap.Config, error)) *MockService_Bootstrap_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ChangeState provides a mock function for the type MockService
|
|
func (_mock *MockService) ChangeState(ctx context.Context, session authn.Session, token string, id string, state bootstrap.State) error {
|
|
ret := _mock.Called(ctx, session, token, id, state)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ChangeState")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, bootstrap.State) error); ok {
|
|
r0 = returnFunc(ctx, session, token, id, state)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_ChangeState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeState'
|
|
type MockService_ChangeState_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ChangeState is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - token
|
|
// - id
|
|
// - state
|
|
func (_e *MockService_Expecter) ChangeState(ctx interface{}, session interface{}, token interface{}, id interface{}, state interface{}) *MockService_ChangeState_Call {
|
|
return &MockService_ChangeState_Call{Call: _e.mock.On("ChangeState", ctx, session, token, id, state)}
|
|
}
|
|
|
|
func (_c *MockService_ChangeState_Call) Run(run func(ctx context.Context, session authn.Session, token string, id string, state bootstrap.State)) *MockService_ChangeState_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(bootstrap.State))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_ChangeState_Call) Return(err error) *MockService_ChangeState_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_ChangeState_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, token string, id string, state bootstrap.State) error) *MockService_ChangeState_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ConnectClientHandler provides a mock function for the type MockService
|
|
func (_mock *MockService) ConnectClientHandler(ctx context.Context, channelID string, clientID string) error {
|
|
ret := _mock.Called(ctx, channelID, clientID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ConnectClientHandler")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, channelID, clientID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_ConnectClientHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConnectClientHandler'
|
|
type MockService_ConnectClientHandler_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ConnectClientHandler is a helper method to define mock.On call
|
|
// - ctx
|
|
// - channelID
|
|
// - clientID
|
|
func (_e *MockService_Expecter) ConnectClientHandler(ctx interface{}, channelID interface{}, clientID interface{}) *MockService_ConnectClientHandler_Call {
|
|
return &MockService_ConnectClientHandler_Call{Call: _e.mock.On("ConnectClientHandler", ctx, channelID, clientID)}
|
|
}
|
|
|
|
func (_c *MockService_ConnectClientHandler_Call) Run(run func(ctx context.Context, channelID string, clientID string)) *MockService_ConnectClientHandler_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_ConnectClientHandler_Call) Return(err error) *MockService_ConnectClientHandler_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_ConnectClientHandler_Call) RunAndReturn(run func(ctx context.Context, channelID string, clientID string) error) *MockService_ConnectClientHandler_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DisconnectClientHandler provides a mock function for the type MockService
|
|
func (_mock *MockService) DisconnectClientHandler(ctx context.Context, channelID string, clientID string) error {
|
|
ret := _mock.Called(ctx, channelID, clientID)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for DisconnectClientHandler")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
|
|
r0 = returnFunc(ctx, channelID, clientID)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_DisconnectClientHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectClientHandler'
|
|
type MockService_DisconnectClientHandler_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DisconnectClientHandler is a helper method to define mock.On call
|
|
// - ctx
|
|
// - channelID
|
|
// - clientID
|
|
func (_e *MockService_Expecter) DisconnectClientHandler(ctx interface{}, channelID interface{}, clientID interface{}) *MockService_DisconnectClientHandler_Call {
|
|
return &MockService_DisconnectClientHandler_Call{Call: _e.mock.On("DisconnectClientHandler", ctx, channelID, clientID)}
|
|
}
|
|
|
|
func (_c *MockService_DisconnectClientHandler_Call) Run(run func(ctx context.Context, channelID string, clientID string)) *MockService_DisconnectClientHandler_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_DisconnectClientHandler_Call) Return(err error) *MockService_DisconnectClientHandler_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_DisconnectClientHandler_Call) RunAndReturn(run func(ctx context.Context, channelID string, clientID string) error) *MockService_DisconnectClientHandler_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// List provides a mock function for the type MockService
|
|
func (_mock *MockService) List(ctx context.Context, session authn.Session, filter bootstrap.Filter, offset uint64, limit uint64) (bootstrap.ConfigsPage, error) {
|
|
ret := _mock.Called(ctx, session, filter, offset, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for List")
|
|
}
|
|
|
|
var r0 bootstrap.ConfigsPage
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Filter, uint64, uint64) (bootstrap.ConfigsPage, error)); ok {
|
|
return returnFunc(ctx, session, filter, offset, limit)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Filter, uint64, uint64) bootstrap.ConfigsPage); ok {
|
|
r0 = returnFunc(ctx, session, filter, offset, limit)
|
|
} else {
|
|
r0 = ret.Get(0).(bootstrap.ConfigsPage)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, bootstrap.Filter, uint64, uint64) error); ok {
|
|
r1 = returnFunc(ctx, session, filter, offset, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
|
|
type MockService_List_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// List is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - filter
|
|
// - offset
|
|
// - limit
|
|
func (_e *MockService_Expecter) List(ctx interface{}, session interface{}, filter interface{}, offset interface{}, limit interface{}) *MockService_List_Call {
|
|
return &MockService_List_Call{Call: _e.mock.On("List", ctx, session, filter, offset, limit)}
|
|
}
|
|
|
|
func (_c *MockService_List_Call) Run(run func(ctx context.Context, session authn.Session, filter bootstrap.Filter, offset uint64, limit uint64)) *MockService_List_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(bootstrap.Filter), args[3].(uint64), args[4].(uint64))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_List_Call) Return(configsPage bootstrap.ConfigsPage, err error) *MockService_List_Call {
|
|
_c.Call.Return(configsPage, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_List_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, filter bootstrap.Filter, offset uint64, limit uint64) (bootstrap.ConfigsPage, error)) *MockService_List_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Remove provides a mock function for the type MockService
|
|
func (_mock *MockService) Remove(ctx context.Context, session authn.Session, id string) error {
|
|
ret := _mock.Called(ctx, session, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Remove")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) error); ok {
|
|
r0 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
|
|
type MockService_Remove_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Remove is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - id
|
|
func (_e *MockService_Expecter) Remove(ctx interface{}, session interface{}, id interface{}) *MockService_Remove_Call {
|
|
return &MockService_Remove_Call{Call: _e.mock.On("Remove", ctx, session, id)}
|
|
}
|
|
|
|
func (_c *MockService_Remove_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *MockService_Remove_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Remove_Call) Return(err error) *MockService_Remove_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Remove_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) error) *MockService_Remove_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveChannelHandler provides a mock function for the type MockService
|
|
func (_mock *MockService) RemoveChannelHandler(ctx context.Context, id string) error {
|
|
ret := _mock.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveChannelHandler")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_RemoveChannelHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveChannelHandler'
|
|
type MockService_RemoveChannelHandler_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveChannelHandler is a helper method to define mock.On call
|
|
// - ctx
|
|
// - id
|
|
func (_e *MockService_Expecter) RemoveChannelHandler(ctx interface{}, id interface{}) *MockService_RemoveChannelHandler_Call {
|
|
return &MockService_RemoveChannelHandler_Call{Call: _e.mock.On("RemoveChannelHandler", ctx, id)}
|
|
}
|
|
|
|
func (_c *MockService_RemoveChannelHandler_Call) Run(run func(ctx context.Context, id string)) *MockService_RemoveChannelHandler_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_RemoveChannelHandler_Call) Return(err error) *MockService_RemoveChannelHandler_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_RemoveChannelHandler_Call) RunAndReturn(run func(ctx context.Context, id string) error) *MockService_RemoveChannelHandler_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// RemoveConfigHandler provides a mock function for the type MockService
|
|
func (_mock *MockService) RemoveConfigHandler(ctx context.Context, id string) error {
|
|
ret := _mock.Called(ctx, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for RemoveConfigHandler")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
|
|
r0 = returnFunc(ctx, id)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_RemoveConfigHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveConfigHandler'
|
|
type MockService_RemoveConfigHandler_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// RemoveConfigHandler is a helper method to define mock.On call
|
|
// - ctx
|
|
// - id
|
|
func (_e *MockService_Expecter) RemoveConfigHandler(ctx interface{}, id interface{}) *MockService_RemoveConfigHandler_Call {
|
|
return &MockService_RemoveConfigHandler_Call{Call: _e.mock.On("RemoveConfigHandler", ctx, id)}
|
|
}
|
|
|
|
func (_c *MockService_RemoveConfigHandler_Call) Run(run func(ctx context.Context, id string)) *MockService_RemoveConfigHandler_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_RemoveConfigHandler_Call) Return(err error) *MockService_RemoveConfigHandler_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_RemoveConfigHandler_Call) RunAndReturn(run func(ctx context.Context, id string) error) *MockService_RemoveConfigHandler_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Update provides a mock function for the type MockService
|
|
func (_mock *MockService) Update(ctx context.Context, session authn.Session, cfg bootstrap.Config) error {
|
|
ret := _mock.Called(ctx, session, cfg)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Update")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, bootstrap.Config) error); ok {
|
|
r0 = returnFunc(ctx, session, cfg)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
|
|
type MockService_Update_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Update is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - cfg
|
|
func (_e *MockService_Expecter) Update(ctx interface{}, session interface{}, cfg interface{}) *MockService_Update_Call {
|
|
return &MockService_Update_Call{Call: _e.mock.On("Update", ctx, session, cfg)}
|
|
}
|
|
|
|
func (_c *MockService_Update_Call) Run(run func(ctx context.Context, session authn.Session, cfg bootstrap.Config)) *MockService_Update_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(bootstrap.Config))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Update_Call) Return(err error) *MockService_Update_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_Update_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, cfg bootstrap.Config) error) *MockService_Update_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateCert provides a mock function for the type MockService
|
|
func (_mock *MockService) UpdateCert(ctx context.Context, session authn.Session, clientID string, clientCert string, clientKey string, caCert string) (bootstrap.Config, error) {
|
|
ret := _mock.Called(ctx, session, clientID, clientCert, clientKey, caCert)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateCert")
|
|
}
|
|
|
|
var r0 bootstrap.Config
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, string, string) (bootstrap.Config, error)); ok {
|
|
return returnFunc(ctx, session, clientID, clientCert, clientKey, caCert)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, string, string) bootstrap.Config); ok {
|
|
r0 = returnFunc(ctx, session, clientID, clientCert, clientKey, caCert)
|
|
} else {
|
|
r0 = ret.Get(0).(bootstrap.Config)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string, string, string, string) error); ok {
|
|
r1 = returnFunc(ctx, session, clientID, clientCert, clientKey, caCert)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockService_UpdateCert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCert'
|
|
type MockService_UpdateCert_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateCert is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - clientID
|
|
// - clientCert
|
|
// - clientKey
|
|
// - caCert
|
|
func (_e *MockService_Expecter) UpdateCert(ctx interface{}, session interface{}, clientID interface{}, clientCert interface{}, clientKey interface{}, caCert interface{}) *MockService_UpdateCert_Call {
|
|
return &MockService_UpdateCert_Call{Call: _e.mock.On("UpdateCert", ctx, session, clientID, clientCert, clientKey, caCert)}
|
|
}
|
|
|
|
func (_c *MockService_UpdateCert_Call) Run(run func(ctx context.Context, session authn.Session, clientID string, clientCert string, clientKey string, caCert string)) *MockService_UpdateCert_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].(string), args[5].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_UpdateCert_Call) Return(config bootstrap.Config, err error) *MockService_UpdateCert_Call {
|
|
_c.Call.Return(config, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_UpdateCert_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, clientID string, clientCert string, clientKey string, caCert string) (bootstrap.Config, error)) *MockService_UpdateCert_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateChannelHandler provides a mock function for the type MockService
|
|
func (_mock *MockService) UpdateChannelHandler(ctx context.Context, channel bootstrap.Channel) error {
|
|
ret := _mock.Called(ctx, channel)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateChannelHandler")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, bootstrap.Channel) error); ok {
|
|
r0 = returnFunc(ctx, channel)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_UpdateChannelHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChannelHandler'
|
|
type MockService_UpdateChannelHandler_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateChannelHandler is a helper method to define mock.On call
|
|
// - ctx
|
|
// - channel
|
|
func (_e *MockService_Expecter) UpdateChannelHandler(ctx interface{}, channel interface{}) *MockService_UpdateChannelHandler_Call {
|
|
return &MockService_UpdateChannelHandler_Call{Call: _e.mock.On("UpdateChannelHandler", ctx, channel)}
|
|
}
|
|
|
|
func (_c *MockService_UpdateChannelHandler_Call) Run(run func(ctx context.Context, channel bootstrap.Channel)) *MockService_UpdateChannelHandler_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(bootstrap.Channel))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_UpdateChannelHandler_Call) Return(err error) *MockService_UpdateChannelHandler_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_UpdateChannelHandler_Call) RunAndReturn(run func(ctx context.Context, channel bootstrap.Channel) error) *MockService_UpdateChannelHandler_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateConnections provides a mock function for the type MockService
|
|
func (_mock *MockService) UpdateConnections(ctx context.Context, session authn.Session, token string, id string, connections []string) error {
|
|
ret := _mock.Called(ctx, session, token, id, connections)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateConnections")
|
|
}
|
|
|
|
var r0 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string, string, []string) error); ok {
|
|
r0 = returnFunc(ctx, session, token, id, connections)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
return r0
|
|
}
|
|
|
|
// MockService_UpdateConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConnections'
|
|
type MockService_UpdateConnections_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateConnections is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - token
|
|
// - id
|
|
// - connections
|
|
func (_e *MockService_Expecter) UpdateConnections(ctx interface{}, session interface{}, token interface{}, id interface{}, connections interface{}) *MockService_UpdateConnections_Call {
|
|
return &MockService_UpdateConnections_Call{Call: _e.mock.On("UpdateConnections", ctx, session, token, id, connections)}
|
|
}
|
|
|
|
func (_c *MockService_UpdateConnections_Call) Run(run func(ctx context.Context, session authn.Session, token string, id string, connections []string)) *MockService_UpdateConnections_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string), args[3].(string), args[4].([]string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_UpdateConnections_Call) Return(err error) *MockService_UpdateConnections_Call {
|
|
_c.Call.Return(err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_UpdateConnections_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, token string, id string, connections []string) error) *MockService_UpdateConnections_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// View provides a mock function for the type MockService
|
|
func (_mock *MockService) View(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error) {
|
|
ret := _mock.Called(ctx, session, id)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for View")
|
|
}
|
|
|
|
var r0 bootstrap.Config
|
|
var r1 error
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) (bootstrap.Config, error)); ok {
|
|
return returnFunc(ctx, session, id)
|
|
}
|
|
if returnFunc, ok := ret.Get(0).(func(context.Context, authn.Session, string) bootstrap.Config); ok {
|
|
r0 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r0 = ret.Get(0).(bootstrap.Config)
|
|
}
|
|
if returnFunc, ok := ret.Get(1).(func(context.Context, authn.Session, string) error); ok {
|
|
r1 = returnFunc(ctx, session, id)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
return r0, r1
|
|
}
|
|
|
|
// MockService_View_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'View'
|
|
type MockService_View_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// View is a helper method to define mock.On call
|
|
// - ctx
|
|
// - session
|
|
// - id
|
|
func (_e *MockService_Expecter) View(ctx interface{}, session interface{}, id interface{}) *MockService_View_Call {
|
|
return &MockService_View_Call{Call: _e.mock.On("View", ctx, session, id)}
|
|
}
|
|
|
|
func (_c *MockService_View_Call) Run(run func(ctx context.Context, session authn.Session, id string)) *MockService_View_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(authn.Session), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_View_Call) Return(config bootstrap.Config, err error) *MockService_View_Call {
|
|
_c.Call.Return(config, err)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockService_View_Call) RunAndReturn(run func(ctx context.Context, session authn.Session, id string) (bootstrap.Config, error)) *MockService_View_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|