github.com/onflow/flow-go@v0.33.17/network/p2p/mock/gossip_sub_inspector_suite.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 irrecoverable "github.com/onflow/flow-go/module/irrecoverable" 8 9 mock "github.com/stretchr/testify/mock" 10 11 p2p "github.com/onflow/flow-go/network/p2p" 12 13 peer "github.com/libp2p/go-libp2p/core/peer" 14 15 pubsub "github.com/libp2p/go-libp2p-pubsub" 16 ) 17 18 // GossipSubInspectorSuite is an autogenerated mock type for the GossipSubInspectorSuite type 19 type GossipSubInspectorSuite struct { 20 mock.Mock 21 } 22 23 // ActiveClustersChanged provides a mock function with given fields: _a0 24 func (_m *GossipSubInspectorSuite) ActiveClustersChanged(_a0 flow.ChainIDList) { 25 _m.Called(_a0) 26 } 27 28 // AddInvalidControlMessageConsumer provides a mock function with given fields: _a0 29 func (_m *GossipSubInspectorSuite) AddInvalidControlMessageConsumer(_a0 p2p.GossipSubInvCtrlMsgNotifConsumer) { 30 _m.Called(_a0) 31 } 32 33 // Done provides a mock function with given fields: 34 func (_m *GossipSubInspectorSuite) Done() <-chan struct{} { 35 ret := _m.Called() 36 37 var r0 <-chan struct{} 38 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 39 r0 = rf() 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(<-chan struct{}) 43 } 44 } 45 46 return r0 47 } 48 49 // InspectFunc provides a mock function with given fields: 50 func (_m *GossipSubInspectorSuite) InspectFunc() func(peer.ID, *pubsub.RPC) error { 51 ret := _m.Called() 52 53 var r0 func(peer.ID, *pubsub.RPC) error 54 if rf, ok := ret.Get(0).(func() func(peer.ID, *pubsub.RPC) error); ok { 55 r0 = rf() 56 } else { 57 if ret.Get(0) != nil { 58 r0 = ret.Get(0).(func(peer.ID, *pubsub.RPC) error) 59 } 60 } 61 62 return r0 63 } 64 65 // Ready provides a mock function with given fields: 66 func (_m *GossipSubInspectorSuite) Ready() <-chan struct{} { 67 ret := _m.Called() 68 69 var r0 <-chan struct{} 70 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 71 r0 = rf() 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).(<-chan struct{}) 75 } 76 } 77 78 return r0 79 } 80 81 // Start provides a mock function with given fields: _a0 82 func (_m *GossipSubInspectorSuite) Start(_a0 irrecoverable.SignalerContext) { 83 _m.Called(_a0) 84 } 85 86 type mockConstructorTestingTNewGossipSubInspectorSuite interface { 87 mock.TestingT 88 Cleanup(func()) 89 } 90 91 // NewGossipSubInspectorSuite creates a new instance of GossipSubInspectorSuite. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 92 func NewGossipSubInspectorSuite(t mockConstructorTestingTNewGossipSubInspectorSuite) *GossipSubInspectorSuite { 93 mock := &GossipSubInspectorSuite{} 94 mock.Mock.Test(t) 95 96 t.Cleanup(func() { mock.AssertExpectations(t) }) 97 98 return mock 99 }