github.com/nilium/gitlab-runner@v12.5.0+incompatible/helpers/docker/mock_Client.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // This comment works around https://github.com/vektra/mockery/issues/155 4 5 package docker_helpers 6 7 import container "github.com/docker/docker/api/types/container" 8 import context "context" 9 import io "io" 10 import mock "github.com/stretchr/testify/mock" 11 import network "github.com/docker/docker/api/types/network" 12 import types "github.com/docker/docker/api/types" 13 14 // MockClient is an autogenerated mock type for the Client type 15 type MockClient struct { 16 mock.Mock 17 } 18 19 // Close provides a mock function with given fields: 20 func (_m *MockClient) Close() error { 21 ret := _m.Called() 22 23 var r0 error 24 if rf, ok := ret.Get(0).(func() error); ok { 25 r0 = rf() 26 } else { 27 r0 = ret.Error(0) 28 } 29 30 return r0 31 } 32 33 // ContainerAttach provides a mock function with given fields: ctx, _a1, options 34 func (_m *MockClient) ContainerAttach(ctx context.Context, _a1 string, options types.ContainerAttachOptions) (types.HijackedResponse, error) { 35 ret := _m.Called(ctx, _a1, options) 36 37 var r0 types.HijackedResponse 38 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerAttachOptions) types.HijackedResponse); ok { 39 r0 = rf(ctx, _a1, options) 40 } else { 41 r0 = ret.Get(0).(types.HijackedResponse) 42 } 43 44 var r1 error 45 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerAttachOptions) error); ok { 46 r1 = rf(ctx, _a1, options) 47 } else { 48 r1 = ret.Error(1) 49 } 50 51 return r0, r1 52 } 53 54 // ContainerCreate provides a mock function with given fields: ctx, config, hostConfig, networkingConfig, containerName 55 func (_m *MockClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error) { 56 ret := _m.Called(ctx, config, hostConfig, networkingConfig, containerName) 57 58 var r0 container.ContainerCreateCreatedBody 59 if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, string) container.ContainerCreateCreatedBody); ok { 60 r0 = rf(ctx, config, hostConfig, networkingConfig, containerName) 61 } else { 62 r0 = ret.Get(0).(container.ContainerCreateCreatedBody) 63 } 64 65 var r1 error 66 if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, string) error); ok { 67 r1 = rf(ctx, config, hostConfig, networkingConfig, containerName) 68 } else { 69 r1 = ret.Error(1) 70 } 71 72 return r0, r1 73 } 74 75 // ContainerExecAttach provides a mock function with given fields: ctx, execID, config 76 func (_m *MockClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error) { 77 ret := _m.Called(ctx, execID, config) 78 79 var r0 types.HijackedResponse 80 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecStartCheck) types.HijackedResponse); ok { 81 r0 = rf(ctx, execID, config) 82 } else { 83 r0 = ret.Get(0).(types.HijackedResponse) 84 } 85 86 var r1 error 87 if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecStartCheck) error); ok { 88 r1 = rf(ctx, execID, config) 89 } else { 90 r1 = ret.Error(1) 91 } 92 93 return r0, r1 94 } 95 96 // ContainerExecCreate provides a mock function with given fields: ctx, _a1, config 97 func (_m *MockClient) ContainerExecCreate(ctx context.Context, _a1 string, config types.ExecConfig) (types.IDResponse, error) { 98 ret := _m.Called(ctx, _a1, config) 99 100 var r0 types.IDResponse 101 if rf, ok := ret.Get(0).(func(context.Context, string, types.ExecConfig) types.IDResponse); ok { 102 r0 = rf(ctx, _a1, config) 103 } else { 104 r0 = ret.Get(0).(types.IDResponse) 105 } 106 107 var r1 error 108 if rf, ok := ret.Get(1).(func(context.Context, string, types.ExecConfig) error); ok { 109 r1 = rf(ctx, _a1, config) 110 } else { 111 r1 = ret.Error(1) 112 } 113 114 return r0, r1 115 } 116 117 // ContainerInspect provides a mock function with given fields: ctx, containerID 118 func (_m *MockClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) { 119 ret := _m.Called(ctx, containerID) 120 121 var r0 types.ContainerJSON 122 if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { 123 r0 = rf(ctx, containerID) 124 } else { 125 r0 = ret.Get(0).(types.ContainerJSON) 126 } 127 128 var r1 error 129 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 130 r1 = rf(ctx, containerID) 131 } else { 132 r1 = ret.Error(1) 133 } 134 135 return r0, r1 136 } 137 138 // ContainerKill provides a mock function with given fields: ctx, containerID, signal 139 func (_m *MockClient) ContainerKill(ctx context.Context, containerID string, signal string) error { 140 ret := _m.Called(ctx, containerID, signal) 141 142 var r0 error 143 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 144 r0 = rf(ctx, containerID, signal) 145 } else { 146 r0 = ret.Error(0) 147 } 148 149 return r0 150 } 151 152 // ContainerLogs provides a mock function with given fields: ctx, _a1, options 153 func (_m *MockClient) ContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) (io.ReadCloser, error) { 154 ret := _m.Called(ctx, _a1, options) 155 156 var r0 io.ReadCloser 157 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { 158 r0 = rf(ctx, _a1, options) 159 } else { 160 if ret.Get(0) != nil { 161 r0 = ret.Get(0).(io.ReadCloser) 162 } 163 } 164 165 var r1 error 166 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { 167 r1 = rf(ctx, _a1, options) 168 } else { 169 r1 = ret.Error(1) 170 } 171 172 return r0, r1 173 } 174 175 // ContainerRemove provides a mock function with given fields: ctx, containerID, options 176 func (_m *MockClient) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { 177 ret := _m.Called(ctx, containerID, options) 178 179 var r0 error 180 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerRemoveOptions) error); ok { 181 r0 = rf(ctx, containerID, options) 182 } else { 183 r0 = ret.Error(0) 184 } 185 186 return r0 187 } 188 189 // ContainerStart provides a mock function with given fields: ctx, containerID, options 190 func (_m *MockClient) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { 191 ret := _m.Called(ctx, containerID, options) 192 193 var r0 error 194 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerStartOptions) error); ok { 195 r0 = rf(ctx, containerID, options) 196 } else { 197 r0 = ret.Error(0) 198 } 199 200 return r0 201 } 202 203 // ImageImportBlocking provides a mock function with given fields: ctx, source, ref, options 204 func (_m *MockClient) ImageImportBlocking(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) error { 205 ret := _m.Called(ctx, source, ref, options) 206 207 var r0 error 208 if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) error); ok { 209 r0 = rf(ctx, source, ref, options) 210 } else { 211 r0 = ret.Error(0) 212 } 213 214 return r0 215 } 216 217 // ImageInspectWithRaw provides a mock function with given fields: ctx, imageID 218 func (_m *MockClient) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) { 219 ret := _m.Called(ctx, imageID) 220 221 var r0 types.ImageInspect 222 if rf, ok := ret.Get(0).(func(context.Context, string) types.ImageInspect); ok { 223 r0 = rf(ctx, imageID) 224 } else { 225 r0 = ret.Get(0).(types.ImageInspect) 226 } 227 228 var r1 []byte 229 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 230 r1 = rf(ctx, imageID) 231 } else { 232 if ret.Get(1) != nil { 233 r1 = ret.Get(1).([]byte) 234 } 235 } 236 237 var r2 error 238 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 239 r2 = rf(ctx, imageID) 240 } else { 241 r2 = ret.Error(2) 242 } 243 244 return r0, r1, r2 245 } 246 247 // ImagePullBlocking provides a mock function with given fields: ctx, ref, options 248 func (_m *MockClient) ImagePullBlocking(ctx context.Context, ref string, options types.ImagePullOptions) error { 249 ret := _m.Called(ctx, ref, options) 250 251 var r0 error 252 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) error); ok { 253 r0 = rf(ctx, ref, options) 254 } else { 255 r0 = ret.Error(0) 256 } 257 258 return r0 259 } 260 261 // Info provides a mock function with given fields: ctx 262 func (_m *MockClient) Info(ctx context.Context) (types.Info, error) { 263 ret := _m.Called(ctx) 264 265 var r0 types.Info 266 if rf, ok := ret.Get(0).(func(context.Context) types.Info); ok { 267 r0 = rf(ctx) 268 } else { 269 r0 = ret.Get(0).(types.Info) 270 } 271 272 var r1 error 273 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 274 r1 = rf(ctx) 275 } else { 276 r1 = ret.Error(1) 277 } 278 279 return r0, r1 280 } 281 282 // NetworkDisconnect provides a mock function with given fields: ctx, networkID, containerID, force 283 func (_m *MockClient) NetworkDisconnect(ctx context.Context, networkID string, containerID string, force bool) error { 284 ret := _m.Called(ctx, networkID, containerID, force) 285 286 var r0 error 287 if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok { 288 r0 = rf(ctx, networkID, containerID, force) 289 } else { 290 r0 = ret.Error(0) 291 } 292 293 return r0 294 } 295 296 // NetworkList provides a mock function with given fields: ctx, options 297 func (_m *MockClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { 298 ret := _m.Called(ctx, options) 299 300 var r0 []types.NetworkResource 301 if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) []types.NetworkResource); ok { 302 r0 = rf(ctx, options) 303 } else { 304 if ret.Get(0) != nil { 305 r0 = ret.Get(0).([]types.NetworkResource) 306 } 307 } 308 309 var r1 error 310 if rf, ok := ret.Get(1).(func(context.Context, types.NetworkListOptions) error); ok { 311 r1 = rf(ctx, options) 312 } else { 313 r1 = ret.Error(1) 314 } 315 316 return r0, r1 317 }