github.com/alloyci/alloy-runner@v1.0.1-0.20180222164613-925503ccafd6/helpers/docker/mock_Client.go (about) 1 // Code generated by mockery v1.0.0 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 "golang.org/x/net/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 // ContainerInspect provides a mock function with given fields: ctx, containerID 76 func (_m *MockClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) { 77 ret := _m.Called(ctx, containerID) 78 79 var r0 types.ContainerJSON 80 if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { 81 r0 = rf(ctx, containerID) 82 } else { 83 r0 = ret.Get(0).(types.ContainerJSON) 84 } 85 86 var r1 error 87 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 88 r1 = rf(ctx, containerID) 89 } else { 90 r1 = ret.Error(1) 91 } 92 93 return r0, r1 94 } 95 96 // ContainerKill provides a mock function with given fields: ctx, containerID, signal 97 func (_m *MockClient) ContainerKill(ctx context.Context, containerID string, signal string) error { 98 ret := _m.Called(ctx, containerID, signal) 99 100 var r0 error 101 if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { 102 r0 = rf(ctx, containerID, signal) 103 } else { 104 r0 = ret.Error(0) 105 } 106 107 return r0 108 } 109 110 // ContainerLogs provides a mock function with given fields: ctx, _a1, options 111 func (_m *MockClient) ContainerLogs(ctx context.Context, _a1 string, options types.ContainerLogsOptions) (io.ReadCloser, error) { 112 ret := _m.Called(ctx, _a1, options) 113 114 var r0 io.ReadCloser 115 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerLogsOptions) io.ReadCloser); ok { 116 r0 = rf(ctx, _a1, options) 117 } else { 118 if ret.Get(0) != nil { 119 r0 = ret.Get(0).(io.ReadCloser) 120 } 121 } 122 123 var r1 error 124 if rf, ok := ret.Get(1).(func(context.Context, string, types.ContainerLogsOptions) error); ok { 125 r1 = rf(ctx, _a1, options) 126 } else { 127 r1 = ret.Error(1) 128 } 129 130 return r0, r1 131 } 132 133 // ContainerRemove provides a mock function with given fields: ctx, containerID, options 134 func (_m *MockClient) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error { 135 ret := _m.Called(ctx, containerID, options) 136 137 var r0 error 138 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerRemoveOptions) error); ok { 139 r0 = rf(ctx, containerID, options) 140 } else { 141 r0 = ret.Error(0) 142 } 143 144 return r0 145 } 146 147 // ContainerStart provides a mock function with given fields: ctx, containerID, options 148 func (_m *MockClient) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error { 149 ret := _m.Called(ctx, containerID, options) 150 151 var r0 error 152 if rf, ok := ret.Get(0).(func(context.Context, string, types.ContainerStartOptions) error); ok { 153 r0 = rf(ctx, containerID, options) 154 } else { 155 r0 = ret.Error(0) 156 } 157 158 return r0 159 } 160 161 // ContainerWait provides a mock function with given fields: ctx, containerID 162 func (_m *MockClient) ContainerWait(ctx context.Context, containerID string) (int64, error) { 163 ret := _m.Called(ctx, containerID) 164 165 var r0 int64 166 if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok { 167 r0 = rf(ctx, containerID) 168 } else { 169 r0 = ret.Get(0).(int64) 170 } 171 172 var r1 error 173 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 174 r1 = rf(ctx, containerID) 175 } else { 176 r1 = ret.Error(1) 177 } 178 179 return r0, r1 180 } 181 182 // ImageImportBlocking provides a mock function with given fields: ctx, source, ref, options 183 func (_m *MockClient) ImageImportBlocking(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) error { 184 ret := _m.Called(ctx, source, ref, options) 185 186 var r0 error 187 if rf, ok := ret.Get(0).(func(context.Context, types.ImageImportSource, string, types.ImageImportOptions) error); ok { 188 r0 = rf(ctx, source, ref, options) 189 } else { 190 r0 = ret.Error(0) 191 } 192 193 return r0 194 } 195 196 // ImageInspectWithRaw provides a mock function with given fields: ctx, imageID 197 func (_m *MockClient) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) { 198 ret := _m.Called(ctx, imageID) 199 200 var r0 types.ImageInspect 201 if rf, ok := ret.Get(0).(func(context.Context, string) types.ImageInspect); ok { 202 r0 = rf(ctx, imageID) 203 } else { 204 r0 = ret.Get(0).(types.ImageInspect) 205 } 206 207 var r1 []byte 208 if rf, ok := ret.Get(1).(func(context.Context, string) []byte); ok { 209 r1 = rf(ctx, imageID) 210 } else { 211 if ret.Get(1) != nil { 212 r1 = ret.Get(1).([]byte) 213 } 214 } 215 216 var r2 error 217 if rf, ok := ret.Get(2).(func(context.Context, string) error); ok { 218 r2 = rf(ctx, imageID) 219 } else { 220 r2 = ret.Error(2) 221 } 222 223 return r0, r1, r2 224 } 225 226 // ImagePullBlocking provides a mock function with given fields: ctx, ref, options 227 func (_m *MockClient) ImagePullBlocking(ctx context.Context, ref string, options types.ImagePullOptions) error { 228 ret := _m.Called(ctx, ref, options) 229 230 var r0 error 231 if rf, ok := ret.Get(0).(func(context.Context, string, types.ImagePullOptions) error); ok { 232 r0 = rf(ctx, ref, options) 233 } else { 234 r0 = ret.Error(0) 235 } 236 237 return r0 238 } 239 240 // Info provides a mock function with given fields: ctx 241 func (_m *MockClient) Info(ctx context.Context) (types.Info, error) { 242 ret := _m.Called(ctx) 243 244 var r0 types.Info 245 if rf, ok := ret.Get(0).(func(context.Context) types.Info); ok { 246 r0 = rf(ctx) 247 } else { 248 r0 = ret.Get(0).(types.Info) 249 } 250 251 var r1 error 252 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 253 r1 = rf(ctx) 254 } else { 255 r1 = ret.Error(1) 256 } 257 258 return r0, r1 259 } 260 261 // NetworkDisconnect provides a mock function with given fields: ctx, networkID, containerID, force 262 func (_m *MockClient) NetworkDisconnect(ctx context.Context, networkID string, containerID string, force bool) error { 263 ret := _m.Called(ctx, networkID, containerID, force) 264 265 var r0 error 266 if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok { 267 r0 = rf(ctx, networkID, containerID, force) 268 } else { 269 r0 = ret.Error(0) 270 } 271 272 return r0 273 } 274 275 // NetworkList provides a mock function with given fields: ctx, options 276 func (_m *MockClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { 277 ret := _m.Called(ctx, options) 278 279 var r0 []types.NetworkResource 280 if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) []types.NetworkResource); ok { 281 r0 = rf(ctx, options) 282 } else { 283 if ret.Get(0) != nil { 284 r0 = ret.Get(0).([]types.NetworkResource) 285 } 286 } 287 288 var r1 error 289 if rf, ok := ret.Get(1).(func(context.Context, types.NetworkListOptions) error); ok { 290 r1 = rf(ctx, options) 291 } else { 292 r1 = ret.Error(1) 293 } 294 295 return r0, r1 296 }