-
Notifications
You must be signed in to change notification settings - Fork 1
/
container_runner_mock.go
284 lines (241 loc) · 12.3 KB
/
container_runner_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
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
// Code generated by MockGen. DO NOT EDIT.
// Source: container_runner.go
// Package builder is a generated GoMock package.
package builder
import (
context "context"
reflect "reflect"
contracts "github.com/estafette/estafette-ci-contracts"
manifest "github.com/estafette/estafette-ci-manifest"
gomock "github.com/golang/mock/gomock"
)
// MockContainerRunner is a mock of ContainerRunner interface.
type MockContainerRunner struct {
ctrl *gomock.Controller
recorder *MockContainerRunnerMockRecorder
}
// MockContainerRunnerMockRecorder is the mock recorder for MockContainerRunner.
type MockContainerRunnerMockRecorder struct {
mock *MockContainerRunner
}
// NewMockContainerRunner creates a new mock instance.
func NewMockContainerRunner(ctrl *gomock.Controller) *MockContainerRunner {
mock := &MockContainerRunner{ctrl: ctrl}
mock.recorder = &MockContainerRunnerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockContainerRunner) EXPECT() *MockContainerRunnerMockRecorder {
return m.recorder
}
// CreateDockerClient mocks base method.
func (m *MockContainerRunner) CreateDockerClient() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateDockerClient")
ret0, _ := ret[0].(error)
return ret0
}
// CreateDockerClient indicates an expected call of CreateDockerClient.
func (mr *MockContainerRunnerMockRecorder) CreateDockerClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDockerClient", reflect.TypeOf((*MockContainerRunner)(nil).CreateDockerClient))
}
// CreateNetworks mocks base method.
func (m *MockContainerRunner) CreateNetworks(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CreateNetworks", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// CreateNetworks indicates an expected call of CreateNetworks.
func (mr *MockContainerRunnerMockRecorder) CreateNetworks(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworks", reflect.TypeOf((*MockContainerRunner)(nil).CreateNetworks), ctx)
}
// DeleteNetworks mocks base method.
func (m *MockContainerRunner) DeleteNetworks(ctx context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DeleteNetworks", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteNetworks indicates an expected call of DeleteNetworks.
func (mr *MockContainerRunnerMockRecorder) DeleteNetworks(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworks", reflect.TypeOf((*MockContainerRunner)(nil).DeleteNetworks), ctx)
}
// GetImageSize mocks base method.
func (m *MockContainerRunner) GetImageSize(ctx context.Context, containerImage string) (int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetImageSize", ctx, containerImage)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetImageSize indicates an expected call of GetImageSize.
func (mr *MockContainerRunnerMockRecorder) GetImageSize(ctx, containerImage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetImageSize", reflect.TypeOf((*MockContainerRunner)(nil).GetImageSize), ctx, containerImage)
}
// HasInjectedCredentials mocks base method.
func (m *MockContainerRunner) HasInjectedCredentials(stageName, containerImage string) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HasInjectedCredentials", stageName, containerImage)
ret0, _ := ret[0].(bool)
return ret0
}
// HasInjectedCredentials indicates an expected call of HasInjectedCredentials.
func (mr *MockContainerRunnerMockRecorder) HasInjectedCredentials(stageName, containerImage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasInjectedCredentials", reflect.TypeOf((*MockContainerRunner)(nil).HasInjectedCredentials), stageName, containerImage)
}
// Info mocks base method.
func (m *MockContainerRunner) Info(ctx context.Context) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Info", ctx)
ret0, _ := ret[0].(string)
return ret0
}
// Info indicates an expected call of Info.
func (mr *MockContainerRunnerMockRecorder) Info(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockContainerRunner)(nil).Info), ctx)
}
// IsImagePulled mocks base method.
func (m *MockContainerRunner) IsImagePulled(ctx context.Context, stageName, containerImage string) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsImagePulled", ctx, stageName, containerImage)
ret0, _ := ret[0].(bool)
return ret0
}
// IsImagePulled indicates an expected call of IsImagePulled.
func (mr *MockContainerRunnerMockRecorder) IsImagePulled(ctx, stageName, containerImage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsImagePulled", reflect.TypeOf((*MockContainerRunner)(nil).IsImagePulled), ctx, stageName, containerImage)
}
// IsTrustedImage mocks base method.
func (m *MockContainerRunner) IsTrustedImage(stageName, containerImage string) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsTrustedImage", stageName, containerImage)
ret0, _ := ret[0].(bool)
return ret0
}
// IsTrustedImage indicates an expected call of IsTrustedImage.
func (mr *MockContainerRunnerMockRecorder) IsTrustedImage(stageName, containerImage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTrustedImage", reflect.TypeOf((*MockContainerRunner)(nil).IsTrustedImage), stageName, containerImage)
}
// PullImage mocks base method.
func (m *MockContainerRunner) PullImage(ctx context.Context, stageName, parentStageName, containerImage string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PullImage", ctx, stageName, parentStageName, containerImage)
ret0, _ := ret[0].(error)
return ret0
}
// PullImage indicates an expected call of PullImage.
func (mr *MockContainerRunnerMockRecorder) PullImage(ctx, stageName, parentStageName, containerImage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PullImage", reflect.TypeOf((*MockContainerRunner)(nil).PullImage), ctx, stageName, parentStageName, containerImage)
}
// RunReadinessProbeContainer mocks base method.
func (m *MockContainerRunner) RunReadinessProbeContainer(ctx context.Context, parentStage manifest.EstafetteStage, service manifest.EstafetteService, readiness manifest.ReadinessProbe) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RunReadinessProbeContainer", ctx, parentStage, service, readiness)
ret0, _ := ret[0].(error)
return ret0
}
// RunReadinessProbeContainer indicates an expected call of RunReadinessProbeContainer.
func (mr *MockContainerRunnerMockRecorder) RunReadinessProbeContainer(ctx, parentStage, service, readiness interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunReadinessProbeContainer", reflect.TypeOf((*MockContainerRunner)(nil).RunReadinessProbeContainer), ctx, parentStage, service, readiness)
}
// StartDockerDaemon mocks base method.
func (m *MockContainerRunner) StartDockerDaemon() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartDockerDaemon")
ret0, _ := ret[0].(error)
return ret0
}
// StartDockerDaemon indicates an expected call of StartDockerDaemon.
func (mr *MockContainerRunnerMockRecorder) StartDockerDaemon() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartDockerDaemon", reflect.TypeOf((*MockContainerRunner)(nil).StartDockerDaemon))
}
// StartServiceContainer mocks base method.
func (m *MockContainerRunner) StartServiceContainer(ctx context.Context, envvars map[string]string, service manifest.EstafetteService) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartServiceContainer", ctx, envvars, service)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StartServiceContainer indicates an expected call of StartServiceContainer.
func (mr *MockContainerRunnerMockRecorder) StartServiceContainer(ctx, envvars, service interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartServiceContainer", reflect.TypeOf((*MockContainerRunner)(nil).StartServiceContainer), ctx, envvars, service)
}
// StartStageContainer mocks base method.
func (m *MockContainerRunner) StartStageContainer(ctx context.Context, depth int, dir string, envvars map[string]string, stage manifest.EstafetteStage, stageIndex int) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StartStageContainer", ctx, depth, dir, envvars, stage, stageIndex)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StartStageContainer indicates an expected call of StartStageContainer.
func (mr *MockContainerRunnerMockRecorder) StartStageContainer(ctx, depth, dir, envvars, stage, stageIndex interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartStageContainer", reflect.TypeOf((*MockContainerRunner)(nil).StartStageContainer), ctx, depth, dir, envvars, stage, stageIndex)
}
// StopAllContainers mocks base method.
func (m *MockContainerRunner) StopAllContainers(ctx context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "StopAllContainers", ctx)
}
// StopAllContainers indicates an expected call of StopAllContainers.
func (mr *MockContainerRunnerMockRecorder) StopAllContainers(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopAllContainers", reflect.TypeOf((*MockContainerRunner)(nil).StopAllContainers), ctx)
}
// StopMultiStageServiceContainers mocks base method.
func (m *MockContainerRunner) StopMultiStageServiceContainers(ctx context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "StopMultiStageServiceContainers", ctx)
}
// StopMultiStageServiceContainers indicates an expected call of StopMultiStageServiceContainers.
func (mr *MockContainerRunnerMockRecorder) StopMultiStageServiceContainers(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopMultiStageServiceContainers", reflect.TypeOf((*MockContainerRunner)(nil).StopMultiStageServiceContainers), ctx)
}
// StopSingleStageServiceContainers mocks base method.
func (m *MockContainerRunner) StopSingleStageServiceContainers(ctx context.Context, parentStage manifest.EstafetteStage) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "StopSingleStageServiceContainers", ctx, parentStage)
}
// StopSingleStageServiceContainers indicates an expected call of StopSingleStageServiceContainers.
func (mr *MockContainerRunnerMockRecorder) StopSingleStageServiceContainers(ctx, parentStage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopSingleStageServiceContainers", reflect.TypeOf((*MockContainerRunner)(nil).StopSingleStageServiceContainers), ctx, parentStage)
}
// TailContainerLogs mocks base method.
func (m *MockContainerRunner) TailContainerLogs(ctx context.Context, containerID, parentStageName, stageName string, stageType contracts.LogType, depth int, multiStage *bool) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TailContainerLogs", ctx, containerID, parentStageName, stageName, stageType, depth, multiStage)
ret0, _ := ret[0].(error)
return ret0
}
// TailContainerLogs indicates an expected call of TailContainerLogs.
func (mr *MockContainerRunnerMockRecorder) TailContainerLogs(ctx, containerID, parentStageName, stageName, stageType, depth, multiStage interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TailContainerLogs", reflect.TypeOf((*MockContainerRunner)(nil).TailContainerLogs), ctx, containerID, parentStageName, stageName, stageType, depth, multiStage)
}
// WaitForDockerDaemon mocks base method.
func (m *MockContainerRunner) WaitForDockerDaemon() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "WaitForDockerDaemon")
}
// WaitForDockerDaemon indicates an expected call of WaitForDockerDaemon.
func (mr *MockContainerRunnerMockRecorder) WaitForDockerDaemon() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDockerDaemon", reflect.TypeOf((*MockContainerRunner)(nil).WaitForDockerDaemon))
}