2024-11-09 22:17:10 +00:00
// Code generated by mockery v2.43.1. DO NOT EDIT.
package network
import (
context "context"
bootstrap "isle/bootstrap"
daecommon "isle/daemon/daecommon"
mock "github.com/stretchr/testify/mock"
nebula "isle/nebula"
)
// MockNetwork is an autogenerated mock type for the Network type
type MockNetwork struct {
mock . Mock
}
// CreateHost provides a mock function with given fields: _a0, _a1, _a2
func ( _m * MockNetwork ) CreateHost ( _a0 context . Context , _a1 nebula . HostName , _a2 CreateHostOpts ) ( JoiningBootstrap , error ) {
ret := _m . Called ( _a0 , _a1 , _a2 )
if len ( ret ) == 0 {
panic ( "no return value specified for CreateHost" )
}
var r0 JoiningBootstrap
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , CreateHostOpts ) ( JoiningBootstrap , error ) ) ; ok {
return rf ( _a0 , _a1 , _a2 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , CreateHostOpts ) JoiningBootstrap ) ; ok {
r0 = rf ( _a0 , _a1 , _a2 )
} else {
r0 = ret . Get ( 0 ) . ( JoiningBootstrap )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , nebula . HostName , CreateHostOpts ) error ) ; ok {
r1 = rf ( _a0 , _a1 , _a2 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// CreateNebulaCertificate provides a mock function with given fields: _a0, _a1, _a2
func ( _m * MockNetwork ) CreateNebulaCertificate ( _a0 context . Context , _a1 nebula . HostName , _a2 nebula . EncryptingPublicKey ) ( nebula . Certificate , error ) {
ret := _m . Called ( _a0 , _a1 , _a2 )
if len ( ret ) == 0 {
panic ( "no return value specified for CreateNebulaCertificate" )
}
var r0 nebula . Certificate
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , nebula . EncryptingPublicKey ) ( nebula . Certificate , error ) ) ; ok {
return rf ( _a0 , _a1 , _a2 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName , nebula . EncryptingPublicKey ) nebula . Certificate ) ; ok {
r0 = rf ( _a0 , _a1 , _a2 )
} else {
r0 = ret . Get ( 0 ) . ( nebula . Certificate )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , nebula . HostName , nebula . EncryptingPublicKey ) error ) ; ok {
r1 = rf ( _a0 , _a1 , _a2 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-12-07 19:39:13 +00:00
// GetBootstrap provides a mock function with given fields: _a0
func ( _m * MockNetwork ) GetBootstrap ( _a0 context . Context ) ( bootstrap . Bootstrap , error ) {
2024-11-09 22:17:10 +00:00
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
2024-12-07 19:39:13 +00:00
panic ( "no return value specified for GetBootstrap" )
2024-11-09 22:17:10 +00:00
}
2024-12-07 19:39:13 +00:00
var r0 bootstrap . Bootstrap
2024-11-09 22:17:10 +00:00
var r1 error
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( bootstrap . Bootstrap , error ) ) ; ok {
2024-11-09 22:17:10 +00:00
return rf ( _a0 )
}
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) bootstrap . Bootstrap ) ; ok {
2024-11-09 22:17:10 +00:00
r0 = rf ( _a0 )
} else {
2024-12-07 19:39:13 +00:00
r0 = ret . Get ( 0 ) . ( bootstrap . Bootstrap )
2024-11-09 22:17:10 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-12-07 19:39:13 +00:00
// GetConfig provides a mock function with given fields: _a0
func ( _m * MockNetwork ) GetConfig ( _a0 context . Context ) ( daecommon . NetworkConfig , error ) {
2024-11-09 22:17:10 +00:00
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
2024-12-07 19:39:13 +00:00
panic ( "no return value specified for GetConfig" )
2024-11-09 22:17:10 +00:00
}
2024-12-07 19:39:13 +00:00
var r0 daecommon . NetworkConfig
2024-11-09 22:17:10 +00:00
var r1 error
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( daecommon . NetworkConfig , error ) ) ; ok {
2024-11-09 22:17:10 +00:00
return rf ( _a0 )
}
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) daecommon . NetworkConfig ) ; ok {
2024-11-09 22:17:10 +00:00
r0 = rf ( _a0 )
} else {
2024-12-07 19:39:13 +00:00
r0 = ret . Get ( 0 ) . ( daecommon . NetworkConfig )
2024-11-09 22:17:10 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-12-07 19:39:13 +00:00
// GetGarageClientParams provides a mock function with given fields: _a0
func ( _m * MockNetwork ) GetGarageClientParams ( _a0 context . Context ) ( GarageClientParams , error ) {
2024-11-09 22:17:10 +00:00
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
2024-12-07 19:39:13 +00:00
panic ( "no return value specified for GetGarageClientParams" )
2024-11-09 22:17:10 +00:00
}
2024-12-07 19:39:13 +00:00
var r0 GarageClientParams
2024-11-09 22:17:10 +00:00
var r1 error
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( GarageClientParams , error ) ) ; ok {
2024-11-09 22:17:10 +00:00
return rf ( _a0 )
}
2024-12-07 19:39:13 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) GarageClientParams ) ; ok {
2024-11-09 22:17:10 +00:00
r0 = rf ( _a0 )
} else {
2024-12-07 19:39:13 +00:00
r0 = ret . Get ( 0 ) . ( GarageClientParams )
2024-11-09 22:17:10 +00:00
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetNetworkCreationParams provides a mock function with given fields: _a0
func ( _m * MockNetwork ) GetNetworkCreationParams ( _a0 context . Context ) ( bootstrap . CreationParams , error ) {
ret := _m . Called ( _a0 )
if len ( ret ) == 0 {
panic ( "no return value specified for GetNetworkCreationParams" )
}
var r0 bootstrap . CreationParams
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( bootstrap . CreationParams , error ) ) ; ok {
return rf ( _a0 )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) bootstrap . CreationParams ) ; ok {
r0 = rf ( _a0 )
} else {
r0 = ret . Get ( 0 ) . ( bootstrap . CreationParams )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( _a0 )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// RemoveHost provides a mock function with given fields: ctx, hostName
func ( _m * MockNetwork ) RemoveHost ( ctx context . Context , hostName nebula . HostName ) error {
ret := _m . Called ( ctx , hostName )
if len ( ret ) == 0 {
panic ( "no return value specified for RemoveHost" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , nebula . HostName ) error ) ; ok {
r0 = rf ( ctx , hostName )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// SetConfig provides a mock function with given fields: _a0, _a1
func ( _m * MockNetwork ) SetConfig ( _a0 context . Context , _a1 daecommon . NetworkConfig ) error {
ret := _m . Called ( _a0 , _a1 )
if len ( ret ) == 0 {
panic ( "no return value specified for SetConfig" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , daecommon . NetworkConfig ) error ) ; ok {
r0 = rf ( _a0 , _a1 )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Shutdown provides a mock function with given fields:
func ( _m * MockNetwork ) Shutdown ( ) error {
ret := _m . Called ( )
if len ( ret ) == 0 {
panic ( "no return value specified for Shutdown" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) error ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// NewMockNetwork creates a new instance of MockNetwork. 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 NewMockNetwork ( t interface {
mock . TestingT
Cleanup ( func ( ) )
} ) * MockNetwork {
mock := & MockNetwork { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}