github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/aggregator/mocks/mock_prover.go (about) 1 // Code generated by mockery v2.22.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 pb "github.com/0xPolygon/supernets2-node/aggregator/pb" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // ProverMock is an autogenerated mock type for the proverInterface type 13 type ProverMock struct { 14 mock.Mock 15 } 16 17 // Addr provides a mock function with given fields: 18 func (_m *ProverMock) Addr() string { 19 ret := _m.Called() 20 21 var r0 string 22 if rf, ok := ret.Get(0).(func() string); ok { 23 r0 = rf() 24 } else { 25 r0 = ret.Get(0).(string) 26 } 27 28 return r0 29 } 30 31 // AggregatedProof provides a mock function with given fields: inputProof1, inputProof2 32 func (_m *ProverMock) AggregatedProof(inputProof1 string, inputProof2 string) (*string, error) { 33 ret := _m.Called(inputProof1, inputProof2) 34 35 var r0 *string 36 var r1 error 37 if rf, ok := ret.Get(0).(func(string, string) (*string, error)); ok { 38 return rf(inputProof1, inputProof2) 39 } 40 if rf, ok := ret.Get(0).(func(string, string) *string); ok { 41 r0 = rf(inputProof1, inputProof2) 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).(*string) 45 } 46 } 47 48 if rf, ok := ret.Get(1).(func(string, string) error); ok { 49 r1 = rf(inputProof1, inputProof2) 50 } else { 51 r1 = ret.Error(1) 52 } 53 54 return r0, r1 55 } 56 57 // BatchProof provides a mock function with given fields: input 58 func (_m *ProverMock) BatchProof(input *pb.InputProver) (*string, error) { 59 ret := _m.Called(input) 60 61 var r0 *string 62 var r1 error 63 if rf, ok := ret.Get(0).(func(*pb.InputProver) (*string, error)); ok { 64 return rf(input) 65 } 66 if rf, ok := ret.Get(0).(func(*pb.InputProver) *string); ok { 67 r0 = rf(input) 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(*string) 71 } 72 } 73 74 if rf, ok := ret.Get(1).(func(*pb.InputProver) error); ok { 75 r1 = rf(input) 76 } else { 77 r1 = ret.Error(1) 78 } 79 80 return r0, r1 81 } 82 83 // FinalProof provides a mock function with given fields: inputProof, aggregatorAddr 84 func (_m *ProverMock) FinalProof(inputProof string, aggregatorAddr string) (*string, error) { 85 ret := _m.Called(inputProof, aggregatorAddr) 86 87 var r0 *string 88 var r1 error 89 if rf, ok := ret.Get(0).(func(string, string) (*string, error)); ok { 90 return rf(inputProof, aggregatorAddr) 91 } 92 if rf, ok := ret.Get(0).(func(string, string) *string); ok { 93 r0 = rf(inputProof, aggregatorAddr) 94 } else { 95 if ret.Get(0) != nil { 96 r0 = ret.Get(0).(*string) 97 } 98 } 99 100 if rf, ok := ret.Get(1).(func(string, string) error); ok { 101 r1 = rf(inputProof, aggregatorAddr) 102 } else { 103 r1 = ret.Error(1) 104 } 105 106 return r0, r1 107 } 108 109 // ID provides a mock function with given fields: 110 func (_m *ProverMock) ID() string { 111 ret := _m.Called() 112 113 var r0 string 114 if rf, ok := ret.Get(0).(func() string); ok { 115 r0 = rf() 116 } else { 117 r0 = ret.Get(0).(string) 118 } 119 120 return r0 121 } 122 123 // IsIdle provides a mock function with given fields: 124 func (_m *ProverMock) IsIdle() (bool, error) { 125 ret := _m.Called() 126 127 var r0 bool 128 var r1 error 129 if rf, ok := ret.Get(0).(func() (bool, error)); ok { 130 return rf() 131 } 132 if rf, ok := ret.Get(0).(func() bool); ok { 133 r0 = rf() 134 } else { 135 r0 = ret.Get(0).(bool) 136 } 137 138 if rf, ok := ret.Get(1).(func() error); ok { 139 r1 = rf() 140 } else { 141 r1 = ret.Error(1) 142 } 143 144 return r0, r1 145 } 146 147 // Name provides a mock function with given fields: 148 func (_m *ProverMock) Name() string { 149 ret := _m.Called() 150 151 var r0 string 152 if rf, ok := ret.Get(0).(func() string); ok { 153 r0 = rf() 154 } else { 155 r0 = ret.Get(0).(string) 156 } 157 158 return r0 159 } 160 161 // WaitFinalProof provides a mock function with given fields: ctx, proofID 162 func (_m *ProverMock) WaitFinalProof(ctx context.Context, proofID string) (*pb.FinalProof, error) { 163 ret := _m.Called(ctx, proofID) 164 165 var r0 *pb.FinalProof 166 var r1 error 167 if rf, ok := ret.Get(0).(func(context.Context, string) (*pb.FinalProof, error)); ok { 168 return rf(ctx, proofID) 169 } 170 if rf, ok := ret.Get(0).(func(context.Context, string) *pb.FinalProof); ok { 171 r0 = rf(ctx, proofID) 172 } else { 173 if ret.Get(0) != nil { 174 r0 = ret.Get(0).(*pb.FinalProof) 175 } 176 } 177 178 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 179 r1 = rf(ctx, proofID) 180 } else { 181 r1 = ret.Error(1) 182 } 183 184 return r0, r1 185 } 186 187 // WaitRecursiveProof provides a mock function with given fields: ctx, proofID 188 func (_m *ProverMock) WaitRecursiveProof(ctx context.Context, proofID string) (string, error) { 189 ret := _m.Called(ctx, proofID) 190 191 var r0 string 192 var r1 error 193 if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { 194 return rf(ctx, proofID) 195 } 196 if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { 197 r0 = rf(ctx, proofID) 198 } else { 199 r0 = ret.Get(0).(string) 200 } 201 202 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 203 r1 = rf(ctx, proofID) 204 } else { 205 r1 = ret.Error(1) 206 } 207 208 return r0, r1 209 } 210 211 type mockConstructorTestingTNewProverMock interface { 212 mock.TestingT 213 Cleanup(func()) 214 } 215 216 // NewProverMock creates a new instance of ProverMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 217 func NewProverMock(t mockConstructorTestingTNewProverMock) *ProverMock { 218 mock := &ProverMock{} 219 mock.Mock.Test(t) 220 221 t.Cleanup(func() { mock.AssertExpectations(t) }) 222 223 return mock 224 }