github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/peer_updater.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 10 peer "github.com/libp2p/go-libp2p/core/peer" 11 ) 12 13 // PeerUpdater is an autogenerated mock type for the PeerUpdater type 14 type PeerUpdater struct { 15 mock.Mock 16 } 17 18 // UpdatePeers provides a mock function with given fields: ctx, peerIDs 19 func (_m *PeerUpdater) UpdatePeers(ctx context.Context, peerIDs peer.IDSlice) { 20 _m.Called(ctx, peerIDs) 21 } 22 23 type mockConstructorTestingTNewPeerUpdater interface { 24 mock.TestingT 25 Cleanup(func()) 26 } 27 28 // NewPeerUpdater creates a new instance of PeerUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 29 func NewPeerUpdater(t mockConstructorTestingTNewPeerUpdater) *PeerUpdater { 30 mock := &PeerUpdater{} 31 mock.Mock.Test(t) 32 33 t.Cleanup(func() { mock.AssertExpectations(t) }) 34 35 return mock 36 }