github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/rpc/mocks/CoreRPC_RunAndWaitServer.go (about) 1 // Code generated by mockery v2.31.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 mock "github.com/stretchr/testify/mock" 9 metadata "google.golang.org/grpc/metadata" 10 11 pb "github.com/projecteru2/core/rpc/gen" 12 ) 13 14 // CoreRPC_RunAndWaitServer is an autogenerated mock type for the CoreRPC_RunAndWaitServer type 15 type CoreRPC_RunAndWaitServer struct { 16 mock.Mock 17 } 18 19 // Context provides a mock function with given fields: 20 func (_m *CoreRPC_RunAndWaitServer) Context() context.Context { 21 ret := _m.Called() 22 23 var r0 context.Context 24 if rf, ok := ret.Get(0).(func() context.Context); ok { 25 r0 = rf() 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(context.Context) 29 } 30 } 31 32 return r0 33 } 34 35 // Recv provides a mock function with given fields: 36 func (_m *CoreRPC_RunAndWaitServer) Recv() (*pb.RunAndWaitOptions, error) { 37 ret := _m.Called() 38 39 var r0 *pb.RunAndWaitOptions 40 var r1 error 41 if rf, ok := ret.Get(0).(func() (*pb.RunAndWaitOptions, error)); ok { 42 return rf() 43 } 44 if rf, ok := ret.Get(0).(func() *pb.RunAndWaitOptions); ok { 45 r0 = rf() 46 } else { 47 if ret.Get(0) != nil { 48 r0 = ret.Get(0).(*pb.RunAndWaitOptions) 49 } 50 } 51 52 if rf, ok := ret.Get(1).(func() error); ok { 53 r1 = rf() 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 // RecvMsg provides a mock function with given fields: m 62 func (_m *CoreRPC_RunAndWaitServer) RecvMsg(m interface{}) error { 63 ret := _m.Called(m) 64 65 var r0 error 66 if rf, ok := ret.Get(0).(func(interface{}) error); ok { 67 r0 = rf(m) 68 } else { 69 r0 = ret.Error(0) 70 } 71 72 return r0 73 } 74 75 // Send provides a mock function with given fields: _a0 76 func (_m *CoreRPC_RunAndWaitServer) Send(_a0 *pb.AttachWorkloadMessage) error { 77 ret := _m.Called(_a0) 78 79 var r0 error 80 if rf, ok := ret.Get(0).(func(*pb.AttachWorkloadMessage) error); ok { 81 r0 = rf(_a0) 82 } else { 83 r0 = ret.Error(0) 84 } 85 86 return r0 87 } 88 89 // SendHeader provides a mock function with given fields: _a0 90 func (_m *CoreRPC_RunAndWaitServer) SendHeader(_a0 metadata.MD) error { 91 ret := _m.Called(_a0) 92 93 var r0 error 94 if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { 95 r0 = rf(_a0) 96 } else { 97 r0 = ret.Error(0) 98 } 99 100 return r0 101 } 102 103 // SendMsg provides a mock function with given fields: m 104 func (_m *CoreRPC_RunAndWaitServer) SendMsg(m interface{}) error { 105 ret := _m.Called(m) 106 107 var r0 error 108 if rf, ok := ret.Get(0).(func(interface{}) error); ok { 109 r0 = rf(m) 110 } else { 111 r0 = ret.Error(0) 112 } 113 114 return r0 115 } 116 117 // SetHeader provides a mock function with given fields: _a0 118 func (_m *CoreRPC_RunAndWaitServer) SetHeader(_a0 metadata.MD) error { 119 ret := _m.Called(_a0) 120 121 var r0 error 122 if rf, ok := ret.Get(0).(func(metadata.MD) error); ok { 123 r0 = rf(_a0) 124 } else { 125 r0 = ret.Error(0) 126 } 127 128 return r0 129 } 130 131 // SetTrailer provides a mock function with given fields: _a0 132 func (_m *CoreRPC_RunAndWaitServer) SetTrailer(_a0 metadata.MD) { 133 _m.Called(_a0) 134 } 135 136 // NewCoreRPC_RunAndWaitServer creates a new instance of CoreRPC_RunAndWaitServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 137 // The first argument is typically a *testing.T value. 138 func NewCoreRPC_RunAndWaitServer(t interface { 139 mock.TestingT 140 Cleanup(func()) 141 }) *CoreRPC_RunAndWaitServer { 142 mock := &CoreRPC_RunAndWaitServer{} 143 mock.Mock.Test(t) 144 145 t.Cleanup(func() { mock.AssertExpectations(t) }) 146 147 return mock 148 }