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 (
proxycfg "github.com/hashicorp/consul/agent/proxycfg"
mock "github.com/stretchr/testify/mock"
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
structs "github.com/hashicorp/consul/agent/structs"
)
// MockConfigManager is an autogenerated mock type for the ConfigManager type
type MockConfigManager struct {
mock . Mock
}
// Deregister provides a mock function with given fields: proxyID, source
func ( _m * MockConfigManager ) Deregister ( proxyID proxycfg . ProxyID , source proxycfg . ProxySource ) {
_m . Called ( proxyID , source )
}
// Register provides a mock function with given fields: proxyID, service, source, token, overwrite
func ( _m * MockConfigManager ) Register ( proxyID proxycfg . ProxyID , service * structs . NodeService , source proxycfg . ProxySource , token string , overwrite bool ) error {
ret := _m . Called ( proxyID , service , source , token , overwrite )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( proxycfg . ProxyID , * structs . NodeService , proxycfg . ProxySource , string , bool ) error ) ; ok {
r0 = rf ( proxyID , service , source , token , overwrite )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// Watch provides a mock function with given fields: req
2023-08-29 15:15:34 +00:00
func ( _m * MockConfigManager ) Watch ( req proxycfg . ProxyID ) ( <- chan proxysnapshot . ProxySnapshot , proxysnapshot . CancelFunc ) {
2022-05-27 11:38:52 +00:00
ret := _m . Called ( req )
2023-08-29 15:15:34 +00:00
var r0 <- chan proxysnapshot . ProxySnapshot
var r1 proxysnapshot . CancelFunc
if rf , ok := ret . Get ( 0 ) . ( func ( proxycfg . ProxyID ) ( <- chan proxysnapshot . ProxySnapshot , proxysnapshot . CancelFunc ) ) ; ok {
2023-08-24 22:44:14 +00:00
return rf ( req )
}
2023-08-29 15:15:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( proxycfg . ProxyID ) <- chan proxysnapshot . ProxySnapshot ) ; ok {
2022-05-27 11:38:52 +00:00
r0 = rf ( req )
} 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-29 15:15:34 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( proxycfg . ProxyID ) proxysnapshot . CancelFunc ) ; ok {
2022-05-27 11:38:52 +00:00
r1 = rf ( req )
} else {
if ret . Get ( 1 ) != nil {
2023-08-29 15:15:34 +00:00
r1 = ret . Get ( 1 ) . ( proxysnapshot . CancelFunc )
2022-05-27 11:38:52 +00:00
}
}
return r0 , r1
}
2023-08-24 22:44:14 +00:00
// NewMockConfigManager creates a new instance of MockConfigManager. 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 NewMockConfigManager ( t interface {
2023-01-18 18:33:21 +00:00
mock . TestingT
Cleanup ( func ( ) )
2023-08-24 22:44:14 +00:00
} ) * MockConfigManager {
2022-05-27 11:38:52 +00:00
mock := & MockConfigManager { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}