2022-07-05 21:57:15 +00:00
// Code generated by mockery v2.12.2. DO NOT EDIT.
2022-04-19 17:03:03 +00:00
package autopilotevents
import (
acl "github.com/hashicorp/consul/acl"
2022-08-22 14:07:00 +00:00
memdb "github.com/hashicorp/go-memdb"
2022-04-19 17:03:03 +00:00
mock "github.com/stretchr/testify/mock"
structs "github.com/hashicorp/consul/agent/structs"
2022-04-21 14:48:21 +00:00
testing "testing"
2022-04-19 17:03:03 +00:00
types "github.com/hashicorp/consul/types"
)
// MockStateStore is an autogenerated mock type for the StateStore type
type MockStateStore struct {
mock . Mock
}
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 22:34:40 +00:00
// GetNodeID provides a mock function with given fields: _a0, _a1, _a2
func ( _m * MockStateStore ) GetNodeID ( _a0 types . NodeID , _a1 * acl . EnterpriseMeta , _a2 string ) ( uint64 , * structs . Node , error ) {
ret := _m . Called ( _a0 , _a1 , _a2 )
2022-04-19 17:03:03 +00:00
var r0 uint64
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 22:34:40 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( types . NodeID , * acl . EnterpriseMeta , string ) uint64 ) ; ok {
r0 = rf ( _a0 , _a1 , _a2 )
2022-04-19 17:03:03 +00:00
} else {
r0 = ret . Get ( 0 ) . ( uint64 )
}
var r1 * structs . Node
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 22:34:40 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( types . NodeID , * acl . EnterpriseMeta , string ) * structs . Node ) ; ok {
r1 = rf ( _a0 , _a1 , _a2 )
2022-04-19 17:03:03 +00:00
} else {
if ret . Get ( 1 ) != nil {
r1 = ret . Get ( 1 ) . ( * structs . Node )
}
}
var r2 error
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 22:34:40 +00:00
if rf , ok := ret . Get ( 2 ) . ( func ( types . NodeID , * acl . EnterpriseMeta , string ) error ) ; ok {
r2 = rf ( _a0 , _a1 , _a2 )
2022-04-19 17:03:03 +00:00
} else {
r2 = ret . Error ( 2 )
}
return r0 , r1 , r2
}
2022-04-21 14:48:21 +00:00
2022-08-22 14:07:00 +00:00
// NodeService provides a mock function with given fields: ws, nodeName, serviceID, entMeta, peerName
func ( _m * MockStateStore ) NodeService ( ws memdb . WatchSet , nodeName string , serviceID string , entMeta * acl . EnterpriseMeta , peerName string ) ( uint64 , * structs . NodeService , error ) {
ret := _m . Called ( ws , nodeName , serviceID , entMeta , peerName )
var r0 uint64
if rf , ok := ret . Get ( 0 ) . ( func ( memdb . WatchSet , string , string , * acl . EnterpriseMeta , string ) uint64 ) ; ok {
r0 = rf ( ws , nodeName , serviceID , entMeta , peerName )
} else {
r0 = ret . Get ( 0 ) . ( uint64 )
}
var r1 * structs . NodeService
if rf , ok := ret . Get ( 1 ) . ( func ( memdb . WatchSet , string , string , * acl . EnterpriseMeta , string ) * structs . NodeService ) ; ok {
r1 = rf ( ws , nodeName , serviceID , entMeta , peerName )
} else {
if ret . Get ( 1 ) != nil {
r1 = ret . Get ( 1 ) . ( * structs . NodeService )
}
}
var r2 error
if rf , ok := ret . Get ( 2 ) . ( func ( memdb . WatchSet , string , string , * acl . EnterpriseMeta , string ) error ) ; ok {
r2 = rf ( ws , nodeName , serviceID , entMeta , peerName )
} else {
r2 = ret . Error ( 2 )
}
return r0 , r1 , r2
}
2022-07-05 21:57:15 +00:00
// NewMockStateStore creates a new instance of MockStateStore. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
2022-04-21 14:48:21 +00:00
func NewMockStateStore ( t testing . TB ) * MockStateStore {
mock := & MockStateStore { }
2022-07-05 21:57:15 +00:00
mock . Mock . Test ( t )
2022-04-21 14:48:21 +00:00
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}