forked from cloudfoundry/python-buildpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmocks_test.go
More file actions
328 lines (280 loc) · 10.6 KB
/
mocks_test.go
File metadata and controls
328 lines (280 loc) · 10.6 KB
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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
// Code generated by MockGen. DO NOT EDIT.
// Source: supply.go
// Package supply_test is a generated GoMock package.
package supply_test
import (
libbuildpack "github.com/cloudfoundry/libbuildpack"
gomock "github.com/golang/mock/gomock"
io "io"
exec "os/exec"
reflect "reflect"
)
// MockStager is a mock of Stager interface
type MockStager struct {
ctrl *gomock.Controller
recorder *MockStagerMockRecorder
}
// MockStagerMockRecorder is the mock recorder for MockStager
type MockStagerMockRecorder struct {
mock *MockStager
}
// NewMockStager creates a new mock instance
func NewMockStager(ctrl *gomock.Controller) *MockStager {
mock := &MockStager{ctrl: ctrl}
mock.recorder = &MockStagerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockStager) EXPECT() *MockStagerMockRecorder {
return m.recorder
}
// BuildDir mocks base method
func (m *MockStager) BuildDir() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BuildDir")
ret0, _ := ret[0].(string)
return ret0
}
// BuildDir indicates an expected call of BuildDir
func (mr *MockStagerMockRecorder) BuildDir() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildDir", reflect.TypeOf((*MockStager)(nil).BuildDir))
}
// CacheDir mocks base method
func (m *MockStager) CacheDir() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CacheDir")
ret0, _ := ret[0].(string)
return ret0
}
// CacheDir indicates an expected call of CacheDir
func (mr *MockStagerMockRecorder) CacheDir() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheDir", reflect.TypeOf((*MockStager)(nil).CacheDir))
}
// DepDir mocks base method
func (m *MockStager) DepDir() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DepDir")
ret0, _ := ret[0].(string)
return ret0
}
// DepDir indicates an expected call of DepDir
func (mr *MockStagerMockRecorder) DepDir() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DepDir", reflect.TypeOf((*MockStager)(nil).DepDir))
}
// DepsIdx mocks base method
func (m *MockStager) DepsIdx() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DepsIdx")
ret0, _ := ret[0].(string)
return ret0
}
// DepsIdx indicates an expected call of DepsIdx
func (mr *MockStagerMockRecorder) DepsIdx() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DepsIdx", reflect.TypeOf((*MockStager)(nil).DepsIdx))
}
// LinkDirectoryInDepDir mocks base method
func (m *MockStager) LinkDirectoryInDepDir(arg0, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LinkDirectoryInDepDir", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// LinkDirectoryInDepDir indicates an expected call of LinkDirectoryInDepDir
func (mr *MockStagerMockRecorder) LinkDirectoryInDepDir(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkDirectoryInDepDir", reflect.TypeOf((*MockStager)(nil).LinkDirectoryInDepDir), arg0, arg1)
}
// WriteEnvFile mocks base method
func (m *MockStager) WriteEnvFile(arg0, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteEnvFile", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// WriteEnvFile indicates an expected call of WriteEnvFile
func (mr *MockStagerMockRecorder) WriteEnvFile(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteEnvFile", reflect.TypeOf((*MockStager)(nil).WriteEnvFile), arg0, arg1)
}
// WriteProfileD mocks base method
func (m *MockStager) WriteProfileD(arg0, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteProfileD", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// WriteProfileD indicates an expected call of WriteProfileD
func (mr *MockStagerMockRecorder) WriteProfileD(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteProfileD", reflect.TypeOf((*MockStager)(nil).WriteProfileD), arg0, arg1)
}
// MockManifest is a mock of Manifest interface
type MockManifest struct {
ctrl *gomock.Controller
recorder *MockManifestMockRecorder
}
// MockManifestMockRecorder is the mock recorder for MockManifest
type MockManifestMockRecorder struct {
mock *MockManifest
}
// NewMockManifest creates a new mock instance
func NewMockManifest(ctrl *gomock.Controller) *MockManifest {
mock := &MockManifest{ctrl: ctrl}
mock.recorder = &MockManifestMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockManifest) EXPECT() *MockManifestMockRecorder {
return m.recorder
}
// AllDependencyVersions mocks base method
func (m *MockManifest) AllDependencyVersions(arg0 string) []string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AllDependencyVersions", arg0)
ret0, _ := ret[0].([]string)
return ret0
}
// AllDependencyVersions indicates an expected call of AllDependencyVersions
func (mr *MockManifestMockRecorder) AllDependencyVersions(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllDependencyVersions", reflect.TypeOf((*MockManifest)(nil).AllDependencyVersions), arg0)
}
// DefaultVersion mocks base method
func (m *MockManifest) DefaultVersion(arg0 string) (libbuildpack.Dependency, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DefaultVersion", arg0)
ret0, _ := ret[0].(libbuildpack.Dependency)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DefaultVersion indicates an expected call of DefaultVersion
func (mr *MockManifestMockRecorder) DefaultVersion(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultVersion", reflect.TypeOf((*MockManifest)(nil).DefaultVersion), arg0)
}
// IsCached mocks base method
func (m *MockManifest) IsCached() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsCached")
ret0, _ := ret[0].(bool)
return ret0
}
// IsCached indicates an expected call of IsCached
func (mr *MockManifestMockRecorder) IsCached() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsCached", reflect.TypeOf((*MockManifest)(nil).IsCached))
}
// MockInstaller is a mock of Installer interface
type MockInstaller struct {
ctrl *gomock.Controller
recorder *MockInstallerMockRecorder
}
// MockInstallerMockRecorder is the mock recorder for MockInstaller
type MockInstallerMockRecorder struct {
mock *MockInstaller
}
// NewMockInstaller creates a new mock instance
func NewMockInstaller(ctrl *gomock.Controller) *MockInstaller {
mock := &MockInstaller{ctrl: ctrl}
mock.recorder = &MockInstallerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockInstaller) EXPECT() *MockInstallerMockRecorder {
return m.recorder
}
// InstallDependency mocks base method
func (m *MockInstaller) InstallDependency(arg0 libbuildpack.Dependency, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InstallDependency", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// InstallDependency indicates an expected call of InstallDependency
func (mr *MockInstallerMockRecorder) InstallDependency(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallDependency", reflect.TypeOf((*MockInstaller)(nil).InstallDependency), arg0, arg1)
}
// InstallOnlyVersion mocks base method
func (m *MockInstaller) InstallOnlyVersion(arg0, arg1 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InstallOnlyVersion", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// InstallOnlyVersion indicates an expected call of InstallOnlyVersion
func (mr *MockInstallerMockRecorder) InstallOnlyVersion(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstallOnlyVersion", reflect.TypeOf((*MockInstaller)(nil).InstallOnlyVersion), arg0, arg1)
}
// MockCommand is a mock of Command interface
type MockCommand struct {
ctrl *gomock.Controller
recorder *MockCommandMockRecorder
}
// MockCommandMockRecorder is the mock recorder for MockCommand
type MockCommandMockRecorder struct {
mock *MockCommand
}
// NewMockCommand creates a new mock instance
func NewMockCommand(ctrl *gomock.Controller) *MockCommand {
mock := &MockCommand{ctrl: ctrl}
mock.recorder = &MockCommandMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockCommand) EXPECT() *MockCommandMockRecorder {
return m.recorder
}
// Execute mocks base method
func (m *MockCommand) Execute(arg0 string, arg1, arg2 io.Writer, arg3 string, arg4 ...string) error {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1, arg2, arg3}
for _, a := range arg4 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Execute", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// Execute indicates an expected call of Execute
func (mr *MockCommandMockRecorder) Execute(arg0, arg1, arg2, arg3 interface{}, arg4 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1, arg2, arg3}, arg4...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockCommand)(nil).Execute), varargs...)
}
// Output mocks base method
func (m *MockCommand) Output(dir, program string, args ...string) (string, error) {
m.ctrl.T.Helper()
varargs := []interface{}{dir, program}
for _, a := range args {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Output", varargs...)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Output indicates an expected call of Output
func (mr *MockCommandMockRecorder) Output(dir, program interface{}, args ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{dir, program}, args...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Output", reflect.TypeOf((*MockCommand)(nil).Output), varargs...)
}
// RunWithOutput mocks base method
func (m *MockCommand) RunWithOutput(arg0 *exec.Cmd) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RunWithOutput", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RunWithOutput indicates an expected call of RunWithOutput
func (mr *MockCommandMockRecorder) RunWithOutput(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunWithOutput", reflect.TypeOf((*MockCommand)(nil).RunWithOutput), arg0)
}