2024-03-15 18:57:11 +00:00
// Code generated by mockery v2.37.1. DO NOT EDIT.
2022-05-27 11:38:52 +00:00
package catalog
import (
2023-08-29 21:39:29 +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-08-24 22:44:14 +00:00
pbresource "github.com/hashicorp/consul/proto-public/pbresource"
2023-08-29 21:39:29 +00:00
2024-03-15 18:57:11 +00:00
proxycfg "github.com/hashicorp/consul/agent/proxycfg"
2023-08-29 21:39:29 +00:00
proxysnapshot "github.com/hashicorp/consul/internal/mesh/proxy-snapshot"
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
2024-03-15 18:57:11 +00:00
func ( _m * MockWatcher ) Watch ( proxyID * pbresource . ID , nodeName string , token string ) ( <- chan proxysnapshot . ProxySnapshot , limiter . SessionTerminatedChan , proxycfg . SrcTerminatedChan , proxysnapshot . CancelFunc , error ) {
2022-05-27 11:38:52 +00:00
ret := _m . Called ( proxyID , nodeName , token )
2023-08-29 15:15:34 +00:00
var r0 <- chan proxysnapshot . ProxySnapshot
2023-08-24 22:44:14 +00:00
var r1 limiter . SessionTerminatedChan
2024-03-15 18:57:11 +00:00
var r2 proxycfg . SrcTerminatedChan
var r3 proxysnapshot . CancelFunc
var r4 error
if rf , ok := ret . Get ( 0 ) . ( func ( * pbresource . ID , string , string ) ( <- chan proxysnapshot . ProxySnapshot , limiter . SessionTerminatedChan , proxycfg . SrcTerminatedChan , proxysnapshot . CancelFunc , error ) ) ; ok {
2023-08-24 22:44:14 +00:00
return rf ( proxyID , nodeName , token )
}
2023-08-29 15:15:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( * pbresource . ID , string , string ) <- chan proxysnapshot . ProxySnapshot ) ; ok {
2022-05-27 11:38:52 +00:00
r0 = rf ( proxyID , nodeName , token )
} else {
if ret . Get ( 0 ) != nil {
2023-08-29 15:15:34 +00:00
r0 = ret . Get ( 0 ) . ( <- chan proxysnapshot . ProxySnapshot )
2022-05-27 11:38:52 +00:00
}
}
2023-08-24 22:44:14 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( * pbresource . ID , 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
}
}
2024-03-15 18:57:11 +00:00
if rf , ok := ret . Get ( 2 ) . ( func ( * pbresource . ID , string , string ) proxycfg . SrcTerminatedChan ) ; 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 {
2024-03-15 18:57:11 +00:00
r2 = ret . Get ( 2 ) . ( proxycfg . SrcTerminatedChan )
2023-01-18 18:33:21 +00:00
}
}
2024-03-15 18:57:11 +00:00
if rf , ok := ret . Get ( 3 ) . ( func ( * pbresource . ID , string , string ) proxysnapshot . CancelFunc ) ; ok {
2023-01-18 18:33:21 +00:00
r3 = rf ( proxyID , nodeName , token )
} else {
2024-03-15 18:57:11 +00:00
if ret . Get ( 3 ) != nil {
r3 = ret . Get ( 3 ) . ( proxysnapshot . CancelFunc )
}
}
if rf , ok := ret . Get ( 4 ) . ( func ( * pbresource . ID , string , string ) error ) ; ok {
r4 = rf ( proxyID , nodeName , token )
} else {
r4 = ret . Error ( 4 )
2022-05-27 11:38:52 +00:00
}
2024-03-15 18:57:11 +00:00
return r0 , r1 , r2 , r3 , r4
2023-01-18 18:33:21 +00:00
}
2023-08-24 22:44:14 +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.
// The first argument is typically a *testing.T value.
func NewMockWatcher ( t interface {
2023-01-18 18:33:21 +00:00
mock . TestingT
Cleanup ( func ( ) )
2023-08-24 22:44:14 +00:00
} ) * MockWatcher {
2022-05-27 11:38:52 +00:00
mock := & MockWatcher { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}