mirror of https://github.com/hashicorp/consul
John Murret
7 months ago
committed by
GitHub
7 changed files with 662 additions and 216 deletions
@ -0,0 +1,122 @@
|
||||
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
||||
|
||||
package blockingquery |
||||
|
||||
import ( |
||||
time "time" |
||||
|
||||
state "github.com/hashicorp/consul/agent/consul/state" |
||||
mock "github.com/stretchr/testify/mock" |
||||
) |
||||
|
||||
// MockFSMServer is an autogenerated mock type for the FSMServer type
|
||||
type MockFSMServer struct { |
||||
mock.Mock |
||||
} |
||||
|
||||
// ConsistentRead provides a mock function with given fields:
|
||||
func (_m *MockFSMServer) ConsistentRead() error { |
||||
ret := _m.Called() |
||||
|
||||
var r0 error |
||||
if rf, ok := ret.Get(0).(func() error); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Error(0) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// DecrementBlockingQueries provides a mock function with given fields:
|
||||
func (_m *MockFSMServer) DecrementBlockingQueries() uint64 { |
||||
ret := _m.Called() |
||||
|
||||
var r0 uint64 |
||||
if rf, ok := ret.Get(0).(func() uint64); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(uint64) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// GetShutdownChannel provides a mock function with given fields:
|
||||
func (_m *MockFSMServer) GetShutdownChannel() chan struct{} { |
||||
ret := _m.Called() |
||||
|
||||
var r0 chan struct{} |
||||
if rf, ok := ret.Get(0).(func() chan struct{}); ok { |
||||
r0 = rf() |
||||
} else { |
||||
if ret.Get(0) != nil { |
||||
r0 = ret.Get(0).(chan struct{}) |
||||
} |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// GetState provides a mock function with given fields:
|
||||
func (_m *MockFSMServer) GetState() *state.Store { |
||||
ret := _m.Called() |
||||
|
||||
var r0 *state.Store |
||||
if rf, ok := ret.Get(0).(func() *state.Store); ok { |
||||
r0 = rf() |
||||
} else { |
||||
if ret.Get(0) != nil { |
||||
r0 = ret.Get(0).(*state.Store) |
||||
} |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// IncrementBlockingQueries provides a mock function with given fields:
|
||||
func (_m *MockFSMServer) IncrementBlockingQueries() uint64 { |
||||
ret := _m.Called() |
||||
|
||||
var r0 uint64 |
||||
if rf, ok := ret.Get(0).(func() uint64); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(uint64) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// RPCQueryTimeout provides a mock function with given fields: _a0
|
||||
func (_m *MockFSMServer) RPCQueryTimeout(_a0 time.Duration) time.Duration { |
||||
ret := _m.Called(_a0) |
||||
|
||||
var r0 time.Duration |
||||
if rf, ok := ret.Get(0).(func(time.Duration) time.Duration); ok { |
||||
r0 = rf(_a0) |
||||
} else { |
||||
r0 = ret.Get(0).(time.Duration) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// SetQueryMeta provides a mock function with given fields: _a0, _a1
|
||||
func (_m *MockFSMServer) SetQueryMeta(_a0 ResponseMeta, _a1 string) { |
||||
_m.Called(_a0, _a1) |
||||
} |
||||
|
||||
// NewMockFSMServer creates a new instance of MockFSMServer. 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 NewMockFSMServer(t interface { |
||||
mock.TestingT |
||||
Cleanup(func()) |
||||
}) *MockFSMServer { |
||||
mock := &MockFSMServer{} |
||||
mock.Mock.Test(t) |
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) }) |
||||
|
||||
return mock |
||||
} |
@ -0,0 +1,94 @@
|
||||
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
||||
|
||||
package blockingquery |
||||
|
||||
import ( |
||||
time "time" |
||||
|
||||
mock "github.com/stretchr/testify/mock" |
||||
) |
||||
|
||||
// MockRequestOptions is an autogenerated mock type for the RequestOptions type
|
||||
type MockRequestOptions struct { |
||||
mock.Mock |
||||
} |
||||
|
||||
// GetMaxQueryTime provides a mock function with given fields:
|
||||
func (_m *MockRequestOptions) GetMaxQueryTime() (time.Duration, error) { |
||||
ret := _m.Called() |
||||
|
||||
var r0 time.Duration |
||||
var r1 error |
||||
if rf, ok := ret.Get(0).(func() (time.Duration, error)); ok { |
||||
return rf() |
||||
} |
||||
if rf, ok := ret.Get(0).(func() time.Duration); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(time.Duration) |
||||
} |
||||
|
||||
if rf, ok := ret.Get(1).(func() error); ok { |
||||
r1 = rf() |
||||
} else { |
||||
r1 = ret.Error(1) |
||||
} |
||||
|
||||
return r0, r1 |
||||
} |
||||
|
||||
// GetMinQueryIndex provides a mock function with given fields:
|
||||
func (_m *MockRequestOptions) GetMinQueryIndex() uint64 { |
||||
ret := _m.Called() |
||||
|
||||
var r0 uint64 |
||||
if rf, ok := ret.Get(0).(func() uint64); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(uint64) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// GetRequireConsistent provides a mock function with given fields:
|
||||
func (_m *MockRequestOptions) GetRequireConsistent() bool { |
||||
ret := _m.Called() |
||||
|
||||
var r0 bool |
||||
if rf, ok := ret.Get(0).(func() bool); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(bool) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// GetToken provides a mock function with given fields:
|
||||
func (_m *MockRequestOptions) GetToken() string { |
||||
ret := _m.Called() |
||||
|
||||
var r0 string |
||||
if rf, ok := ret.Get(0).(func() string); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(string) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// NewMockRequestOptions creates a new instance of MockRequestOptions. 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 NewMockRequestOptions(t interface { |
||||
mock.TestingT |
||||
Cleanup(func()) |
||||
}) *MockRequestOptions { |
||||
mock := &MockRequestOptions{} |
||||
mock.Mock.Test(t) |
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) }) |
||||
|
||||
return mock |
||||
} |
@ -0,0 +1,62 @@
|
||||
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
||||
|
||||
package blockingquery |
||||
|
||||
import ( |
||||
time "time" |
||||
|
||||
mock "github.com/stretchr/testify/mock" |
||||
) |
||||
|
||||
// MockResponseMeta is an autogenerated mock type for the ResponseMeta type
|
||||
type MockResponseMeta struct { |
||||
mock.Mock |
||||
} |
||||
|
||||
// GetIndex provides a mock function with given fields:
|
||||
func (_m *MockResponseMeta) GetIndex() uint64 { |
||||
ret := _m.Called() |
||||
|
||||
var r0 uint64 |
||||
if rf, ok := ret.Get(0).(func() uint64); ok { |
||||
r0 = rf() |
||||
} else { |
||||
r0 = ret.Get(0).(uint64) |
||||
} |
||||
|
||||
return r0 |
||||
} |
||||
|
||||
// SetIndex provides a mock function with given fields: _a0
|
||||
func (_m *MockResponseMeta) SetIndex(_a0 uint64) { |
||||
_m.Called(_a0) |
||||
} |
||||
|
||||
// SetKnownLeader provides a mock function with given fields: _a0
|
||||
func (_m *MockResponseMeta) SetKnownLeader(_a0 bool) { |
||||
_m.Called(_a0) |
||||
} |
||||
|
||||
// SetLastContact provides a mock function with given fields: _a0
|
||||
func (_m *MockResponseMeta) SetLastContact(_a0 time.Duration) { |
||||
_m.Called(_a0) |
||||
} |
||||
|
||||
// SetResultsFilteredByACLs provides a mock function with given fields: _a0
|
||||
func (_m *MockResponseMeta) SetResultsFilteredByACLs(_a0 bool) { |
||||
_m.Called(_a0) |
||||
} |
||||
|
||||
// NewMockResponseMeta creates a new instance of MockResponseMeta. 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 NewMockResponseMeta(t interface { |
||||
mock.TestingT |
||||
Cleanup(func()) |
||||
}) *MockResponseMeta { |
||||
mock := &MockResponseMeta{} |
||||
mock.Mock.Test(t) |
||||
|
||||
t.Cleanup(func() { mock.AssertExpectations(t) }) |
||||
|
||||
return mock |
||||
} |
Loading…
Reference in new issue