-
Notifications
You must be signed in to change notification settings - Fork 147
/
git.mock.go
237 lines (202 loc) · 8.04 KB
/
git.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/pipe-cd/pipecd/pkg/git (interfaces: Repo)
// Package gittest is a generated GoMock package.
package gittest
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
git "github.com/pipe-cd/pipecd/pkg/git"
)
// MockRepo is a mock of Repo interface.
type MockRepo struct {
ctrl *gomock.Controller
recorder *MockRepoMockRecorder
}
// MockRepoMockRecorder is the mock recorder for MockRepo.
type MockRepoMockRecorder struct {
mock *MockRepo
}
// NewMockRepo creates a new mock instance.
func NewMockRepo(ctrl *gomock.Controller) *MockRepo {
mock := &MockRepo{ctrl: ctrl}
mock.recorder = &MockRepoMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRepo) EXPECT() *MockRepoMockRecorder {
return m.recorder
}
// ChangedFiles mocks base method.
func (m *MockRepo) ChangedFiles(arg0 context.Context, arg1, arg2 string) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChangedFiles", arg0, arg1, arg2)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ChangedFiles indicates an expected call of ChangedFiles.
func (mr *MockRepoMockRecorder) ChangedFiles(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangedFiles", reflect.TypeOf((*MockRepo)(nil).ChangedFiles), arg0, arg1, arg2)
}
// Checkout mocks base method.
func (m *MockRepo) Checkout(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Checkout", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Checkout indicates an expected call of Checkout.
func (mr *MockRepoMockRecorder) Checkout(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Checkout", reflect.TypeOf((*MockRepo)(nil).Checkout), arg0, arg1)
}
// CheckoutPullRequest mocks base method.
func (m *MockRepo) CheckoutPullRequest(arg0 context.Context, arg1 int, arg2 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CheckoutPullRequest", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// CheckoutPullRequest indicates an expected call of CheckoutPullRequest.
func (mr *MockRepoMockRecorder) CheckoutPullRequest(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckoutPullRequest", reflect.TypeOf((*MockRepo)(nil).CheckoutPullRequest), arg0, arg1, arg2)
}
// Clean mocks base method.
func (m *MockRepo) Clean() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Clean")
ret0, _ := ret[0].(error)
return ret0
}
// Clean indicates an expected call of Clean.
func (mr *MockRepoMockRecorder) Clean() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clean", reflect.TypeOf((*MockRepo)(nil).Clean))
}
// CommitChanges mocks base method.
func (m *MockRepo) CommitChanges(arg0 context.Context, arg1, arg2 string, arg3 bool, arg4 map[string][]byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CommitChanges", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(error)
return ret0
}
// CommitChanges indicates an expected call of CommitChanges.
func (mr *MockRepoMockRecorder) CommitChanges(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitChanges", reflect.TypeOf((*MockRepo)(nil).CommitChanges), arg0, arg1, arg2, arg3, arg4)
}
// Copy mocks base method.
func (m *MockRepo) Copy(arg0 string) (git.Repo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Copy", arg0)
ret0, _ := ret[0].(git.Repo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Copy indicates an expected call of Copy.
func (mr *MockRepoMockRecorder) Copy(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Copy", reflect.TypeOf((*MockRepo)(nil).Copy), arg0)
}
// GetClonedBranch mocks base method.
func (m *MockRepo) GetClonedBranch() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetClonedBranch")
ret0, _ := ret[0].(string)
return ret0
}
// GetClonedBranch indicates an expected call of GetClonedBranch.
func (mr *MockRepoMockRecorder) GetClonedBranch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClonedBranch", reflect.TypeOf((*MockRepo)(nil).GetClonedBranch))
}
// GetCommitForRev mocks base method.
func (m *MockRepo) GetCommitForRev(arg0 context.Context, arg1 string) (git.Commit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCommitForRev", arg0, arg1)
ret0, _ := ret[0].(git.Commit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCommitForRev indicates an expected call of GetCommitForRev.
func (mr *MockRepoMockRecorder) GetCommitForRev(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCommitForRev", reflect.TypeOf((*MockRepo)(nil).GetCommitForRev), arg0, arg1)
}
// GetLatestCommit mocks base method.
func (m *MockRepo) GetLatestCommit(arg0 context.Context) (git.Commit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetLatestCommit", arg0)
ret0, _ := ret[0].(git.Commit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetLatestCommit indicates an expected call of GetLatestCommit.
func (mr *MockRepoMockRecorder) GetLatestCommit(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLatestCommit", reflect.TypeOf((*MockRepo)(nil).GetLatestCommit), arg0)
}
// GetPath mocks base method.
func (m *MockRepo) GetPath() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetPath")
ret0, _ := ret[0].(string)
return ret0
}
// GetPath indicates an expected call of GetPath.
func (mr *MockRepoMockRecorder) GetPath() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPath", reflect.TypeOf((*MockRepo)(nil).GetPath))
}
// ListCommits mocks base method.
func (m *MockRepo) ListCommits(arg0 context.Context, arg1 string) ([]git.Commit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListCommits", arg0, arg1)
ret0, _ := ret[0].([]git.Commit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListCommits indicates an expected call of ListCommits.
func (mr *MockRepoMockRecorder) ListCommits(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCommits", reflect.TypeOf((*MockRepo)(nil).ListCommits), arg0, arg1)
}
// MergeRemoteBranch mocks base method.
func (m *MockRepo) MergeRemoteBranch(arg0 context.Context, arg1, arg2, arg3 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MergeRemoteBranch", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// MergeRemoteBranch indicates an expected call of MergeRemoteBranch.
func (mr *MockRepoMockRecorder) MergeRemoteBranch(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MergeRemoteBranch", reflect.TypeOf((*MockRepo)(nil).MergeRemoteBranch), arg0, arg1, arg2, arg3)
}
// Pull mocks base method.
func (m *MockRepo) Pull(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Pull", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Pull indicates an expected call of Pull.
func (mr *MockRepoMockRecorder) Pull(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pull", reflect.TypeOf((*MockRepo)(nil).Pull), arg0, arg1)
}
// Push mocks base method.
func (m *MockRepo) Push(arg0 context.Context, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Push", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Push indicates an expected call of Push.
func (mr *MockRepoMockRecorder) Push(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockRepo)(nil).Push), arg0, arg1)
}