You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/agent/proxycfg-sources/catalog/mock_ConfigManager.go

77 lines
2.3 KiB

// Code generated by mockery v2.32.4. DO NOT EDIT.
package catalog
import (
proxycfg "github.com/hashicorp/consul/agent/proxycfg"
mock "github.com/stretchr/testify/mock"
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
func (_m *MockConfigManager) Watch(req proxycfg.ProxyID) (<-chan proxycfg.ProxySnapshot, proxycfg.CancelFunc) {
ret := _m.Called(req)
var r0 <-chan proxycfg.ProxySnapshot
var r1 proxycfg.CancelFunc
if rf, ok := ret.Get(0).(func(proxycfg.ProxyID) (<-chan proxycfg.ProxySnapshot, proxycfg.CancelFunc)); ok {
return rf(req)
}
if rf, ok := ret.Get(0).(func(proxycfg.ProxyID) <-chan proxycfg.ProxySnapshot); ok {
r0 = rf(req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(<-chan proxycfg.ProxySnapshot)
}
}
if rf, ok := ret.Get(1).(func(proxycfg.ProxyID) proxycfg.CancelFunc); ok {
r1 = rf(req)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(proxycfg.CancelFunc)
}
}
return r0, r1
}
// 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 {
mock.TestingT
Cleanup(func())
}) *MockConfigManager {
mock := &MockConfigManager{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}