/
mock.go
268 lines (229 loc) · 10.2 KB
/
mock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/tinyci/ci-agents/clients/github (interfaces: Client)
// Package github is a generated GoMock package.
package github
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
github "github.com/google/go-github/github"
)
// MockClient is a mock of Client interface.
type MockClient struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder
}
// MockClientMockRecorder is the mock recorder for MockClient.
type MockClientMockRecorder struct {
mock *MockClient
}
// NewMockClient creates a new mock instance.
func NewMockClient(ctrl *gomock.Controller) *MockClient {
mock := &MockClient{ctrl: ctrl}
mock.recorder = &MockClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClient) EXPECT() *MockClientMockRecorder {
return m.recorder
}
// ClearStates mocks base method.
func (m *MockClient) ClearStates(arg0 context.Context, arg1, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClearStates", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ClearStates indicates an expected call of ClearStates.
func (mr *MockClientMockRecorder) ClearStates(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearStates", reflect.TypeOf((*MockClient)(nil).ClearStates), arg0, arg1, arg2)
}
// CommentError mocks base method.
func (m *MockClient) CommentError(arg0 context.Context, arg1 string, arg2 int64, arg3 error) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CommentError", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// CommentError indicates an expected call of CommentError.
func (mr *MockClientMockRecorder) CommentError(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommentError", reflect.TypeOf((*MockClient)(nil).CommentError), arg0, arg1, arg2, arg3)
}
// ErrorStatus mocks base method.
func (m *MockClient) ErrorStatus(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string, arg6 error) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ErrorStatus", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
ret0, _ := ret[0].(error)
return ret0
}
// ErrorStatus indicates an expected call of ErrorStatus.
func (mr *MockClientMockRecorder) ErrorStatus(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ErrorStatus", reflect.TypeOf((*MockClient)(nil).ErrorStatus), arg0, arg1, arg2, arg3, arg4, arg5, arg6)
}
// FinishedStatus mocks base method.
func (m *MockClient) FinishedStatus(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string, arg6 bool, arg7 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FinishedStatus", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
ret0, _ := ret[0].(error)
return ret0
}
// FinishedStatus indicates an expected call of FinishedStatus.
func (mr *MockClientMockRecorder) FinishedStatus(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishedStatus", reflect.TypeOf((*MockClient)(nil).FinishedStatus), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
}
// GetDiffFiles mocks base method.
func (m *MockClient) GetDiffFiles(arg0 context.Context, arg1, arg2, arg3 string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetDiffFiles", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetDiffFiles indicates an expected call of GetDiffFiles.
func (mr *MockClientMockRecorder) GetDiffFiles(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDiffFiles", reflect.TypeOf((*MockClient)(nil).GetDiffFiles), arg0, arg1, arg2, arg3)
}
// GetFile mocks base method.
func (m *MockClient) GetFile(arg0 context.Context, arg1, arg2, arg3 string) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetFile", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetFile indicates an expected call of GetFile.
func (mr *MockClientMockRecorder) GetFile(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFile", reflect.TypeOf((*MockClient)(nil).GetFile), arg0, arg1, arg2, arg3)
}
// GetFileList mocks base method.
func (m *MockClient) GetFileList(arg0 context.Context, arg1, arg2 string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetFileList", arg0, arg1, arg2)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetFileList indicates an expected call of GetFileList.
func (mr *MockClientMockRecorder) GetFileList(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFileList", reflect.TypeOf((*MockClient)(nil).GetFileList), arg0, arg1, arg2)
}
// GetRefs mocks base method.
func (m *MockClient) GetRefs(arg0 context.Context, arg1, arg2 string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRefs", arg0, arg1, arg2)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRefs indicates an expected call of GetRefs.
func (mr *MockClientMockRecorder) GetRefs(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRefs", reflect.TypeOf((*MockClient)(nil).GetRefs), arg0, arg1, arg2)
}
// GetRepository mocks base method.
func (m *MockClient) GetRepository(arg0 context.Context, arg1 string) (*github.Repository, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRepository", arg0, arg1)
ret0, _ := ret[0].(*github.Repository)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRepository indicates an expected call of GetRepository.
func (mr *MockClientMockRecorder) GetRepository(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRepository", reflect.TypeOf((*MockClient)(nil).GetRepository), arg0, arg1)
}
// GetSHA mocks base method.
func (m *MockClient) GetSHA(arg0 context.Context, arg1, arg2 string) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetSHA", arg0, arg1, arg2)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetSHA indicates an expected call of GetSHA.
func (mr *MockClientMockRecorder) GetSHA(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSHA", reflect.TypeOf((*MockClient)(nil).GetSHA), arg0, arg1, arg2)
}
// MyLogin mocks base method.
func (m *MockClient) MyLogin(arg0 context.Context) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MyLogin", arg0)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// MyLogin indicates an expected call of MyLogin.
func (mr *MockClientMockRecorder) MyLogin(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MyLogin", reflect.TypeOf((*MockClient)(nil).MyLogin), arg0)
}
// MyRepositories mocks base method.
func (m *MockClient) MyRepositories(arg0 context.Context) ([]*github.Repository, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MyRepositories", arg0)
ret0, _ := ret[0].([]*github.Repository)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// MyRepositories indicates an expected call of MyRepositories.
func (mr *MockClientMockRecorder) MyRepositories(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MyRepositories", reflect.TypeOf((*MockClient)(nil).MyRepositories), arg0)
}
// PendingStatus mocks base method.
func (m *MockClient) PendingStatus(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PendingStatus", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(error)
return ret0
}
// PendingStatus indicates an expected call of PendingStatus.
func (mr *MockClientMockRecorder) PendingStatus(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PendingStatus", reflect.TypeOf((*MockClient)(nil).PendingStatus), arg0, arg1, arg2, arg3, arg4, arg5)
}
// SetupHook mocks base method.
func (m *MockClient) SetupHook(arg0 context.Context, arg1, arg2, arg3, arg4 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetupHook", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// SetupHook indicates an expected call of SetupHook.
func (mr *MockClientMockRecorder) SetupHook(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetupHook", reflect.TypeOf((*MockClient)(nil).SetupHook), arg0, arg1, arg2, arg3, arg4)
}
// StartedStatus mocks base method.
func (m *MockClient) StartedStatus(arg0 context.Context, arg1, arg2, arg3, arg4, arg5 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartedStatus", arg0, arg1, arg2, arg3, arg4, arg5)
ret0, _ := ret[0].(error)
return ret0
}
// StartedStatus indicates an expected call of StartedStatus.
func (mr *MockClientMockRecorder) StartedStatus(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartedStatus", reflect.TypeOf((*MockClient)(nil).StartedStatus), arg0, arg1, arg2, arg3, arg4, arg5)
}
// TeardownHook mocks base method.
func (m *MockClient) TeardownHook(arg0 context.Context, arg1, arg2, arg3 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TeardownHook", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// TeardownHook indicates an expected call of TeardownHook.
func (mr *MockClientMockRecorder) TeardownHook(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TeardownHook", reflect.TypeOf((*MockClient)(nil).TeardownHook), arg0, arg1, arg2, arg3)
}