2023-01-18 18:33:21 +00:00
// Code generated by mockery v2.15.0. DO NOT EDIT.
2022-05-27 11:38:52 +00:00
package catalog
import (
2023-01-18 18:33:21 +00:00
limiter "github.com/hashicorp/consul/agent/grpc-external/limiter"
2022-05-27 11:38:52 +00:00
mock "github.com/stretchr/testify/mock"
2023-01-18 18:33:21 +00:00
proxycfg "github.com/hashicorp/consul/agent/proxycfg"
2022-05-27 11:38:52 +00:00
2023-01-18 18:33:21 +00:00
structs "github.com/hashicorp/consul/agent/structs"
2022-05-27 11:38:52 +00:00
)
// MockWatcher is an autogenerated mock type for the Watcher type
type MockWatcher struct {
mock . Mock
}
// Watch provides a mock function with given fields: proxyID, nodeName, token
2023-01-18 18:33:21 +00:00
func ( _m * MockWatcher ) Watch ( proxyID structs . ServiceID , nodeName string , token string ) ( <- chan * proxycfg . ConfigSnapshot , limiter . SessionTerminatedChan , proxycfg . CancelFunc , error ) {
2022-05-27 11:38:52 +00:00
ret := _m . Called ( proxyID , nodeName , token )
var r0 <- chan * proxycfg . ConfigSnapshot
if rf , ok := ret . Get ( 0 ) . ( func ( structs . ServiceID , string , string ) <- chan * proxycfg . ConfigSnapshot ) ; ok {
r0 = rf ( proxyID , nodeName , token )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( <- chan * proxycfg . ConfigSnapshot )
}
}
2023-01-18 18:33:21 +00:00
var r1 limiter . SessionTerminatedChan
if rf , ok := ret . Get ( 1 ) . ( func ( structs . ServiceID , string , string ) limiter . SessionTerminatedChan ) ; ok {
2022-05-27 11:38:52 +00:00
r1 = rf ( proxyID , nodeName , token )
} else {
if ret . Get ( 1 ) != nil {
2023-01-18 18:33:21 +00:00
r1 = ret . Get ( 1 ) . ( limiter . SessionTerminatedChan )
2022-05-27 11:38:52 +00:00
}
}
2023-01-18 18:33:21 +00:00
var r2 proxycfg . CancelFunc
if rf , ok := ret . Get ( 2 ) . ( func ( structs . ServiceID , string , string ) proxycfg . CancelFunc ) ; ok {
2022-05-27 11:38:52 +00:00
r2 = rf ( proxyID , nodeName , token )
} else {
2023-01-18 18:33:21 +00:00
if ret . Get ( 2 ) != nil {
r2 = ret . Get ( 2 ) . ( proxycfg . CancelFunc )
}
}
var r3 error
if rf , ok := ret . Get ( 3 ) . ( func ( structs . ServiceID , string , string ) error ) ; ok {
r3 = rf ( proxyID , nodeName , token )
} else {
r3 = ret . Error ( 3 )
2022-05-27 11:38:52 +00:00
}
2023-01-18 18:33:21 +00:00
return r0 , r1 , r2 , r3
}
type mockConstructorTestingTNewMockWatcher interface {
mock . TestingT
Cleanup ( func ( ) )
2022-05-27 11:38:52 +00:00
}
2023-01-18 18:33:21 +00:00
// NewMockWatcher creates a new instance of MockWatcher. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewMockWatcher ( t mockConstructorTestingTNewMockWatcher ) * MockWatcher {
2022-05-27 11:38:52 +00:00
mock := & MockWatcher { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}