2023-08-29 21:39:29 +00:00
// Code generated by mockery v2.33.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
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
2023-08-29 15:15:34 +00:00
func ( _m * MockWatcher ) Watch ( proxyID * pbresource . ID , nodeName string , token string ) ( <- chan proxysnapshot . ProxySnapshot , limiter . SessionTerminatedChan , 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
2023-08-29 15:15:34 +00:00
var r2 proxysnapshot . CancelFunc
2023-08-24 22:44:14 +00:00
var r3 error
2023-08-29 15:15:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( * pbresource . ID , string , string ) ( <- chan proxysnapshot . ProxySnapshot , limiter . SessionTerminatedChan , 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
}
}
2023-08-29 15:15:34 +00:00
if rf , ok := ret . Get ( 2 ) . ( func ( * pbresource . ID , string , string ) proxysnapshot . 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 {
2023-08-29 15:15:34 +00:00
r2 = ret . Get ( 2 ) . ( proxysnapshot . CancelFunc )
2023-01-18 18:33:21 +00:00
}
}
2023-08-24 22:44:14 +00:00
if rf , ok := ret . Get ( 3 ) . ( func ( * pbresource . ID , string , string ) error ) ; ok {
2023-01-18 18:33:21 +00:00
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
}
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
}