github.com/secure-build/gitlab-runner@v12.5.0+incompatible/executors/docker/internal/volumes/mock_containerClient.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 volumes
     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  // mockContainerClient is an autogenerated mock type for the containerClient type
    15  type mockContainerClient struct {
    16  	mock.Mock
    17  }
    18  
    19  // Close provides a mock function with given fields:
    20  func (_m *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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 *mockContainerClient) 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  // LabelContainer provides a mock function with given fields: _a0, containerType, otherLabels
   283  func (_m *mockContainerClient) LabelContainer(_a0 *container.Config, containerType string, otherLabels ...string) {
   284  	_va := make([]interface{}, len(otherLabels))
   285  	for _i := range otherLabels {
   286  		_va[_i] = otherLabels[_i]
   287  	}
   288  	var _ca []interface{}
   289  	_ca = append(_ca, _a0, containerType)
   290  	_ca = append(_ca, _va...)
   291  	_m.Called(_ca...)
   292  }
   293  
   294  // NetworkDisconnect provides a mock function with given fields: ctx, networkID, containerID, force
   295  func (_m *mockContainerClient) NetworkDisconnect(ctx context.Context, networkID string, containerID string, force bool) error {
   296  	ret := _m.Called(ctx, networkID, containerID, force)
   297  
   298  	var r0 error
   299  	if rf, ok := ret.Get(0).(func(context.Context, string, string, bool) error); ok {
   300  		r0 = rf(ctx, networkID, containerID, force)
   301  	} else {
   302  		r0 = ret.Error(0)
   303  	}
   304  
   305  	return r0
   306  }
   307  
   308  // NetworkList provides a mock function with given fields: ctx, options
   309  func (_m *mockContainerClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
   310  	ret := _m.Called(ctx, options)
   311  
   312  	var r0 []types.NetworkResource
   313  	if rf, ok := ret.Get(0).(func(context.Context, types.NetworkListOptions) []types.NetworkResource); ok {
   314  		r0 = rf(ctx, options)
   315  	} else {
   316  		if ret.Get(0) != nil {
   317  			r0 = ret.Get(0).([]types.NetworkResource)
   318  		}
   319  	}
   320  
   321  	var r1 error
   322  	if rf, ok := ret.Get(1).(func(context.Context, types.NetworkListOptions) error); ok {
   323  		r1 = rf(ctx, options)
   324  	} else {
   325  		r1 = ret.Error(1)
   326  	}
   327  
   328  	return r0, r1
   329  }
   330  
   331  // RemoveContainer provides a mock function with given fields: ctx, id
   332  func (_m *mockContainerClient) RemoveContainer(ctx context.Context, id string) error {
   333  	ret := _m.Called(ctx, id)
   334  
   335  	var r0 error
   336  	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
   337  		r0 = rf(ctx, id)
   338  	} else {
   339  		r0 = ret.Error(0)
   340  	}
   341  
   342  	return r0
   343  }
   344  
   345  // WaitForContainer provides a mock function with given fields: id
   346  func (_m *mockContainerClient) WaitForContainer(id string) error {
   347  	ret := _m.Called(id)
   348  
   349  	var r0 error
   350  	if rf, ok := ret.Get(0).(func(string) error); ok {
   351  		r0 = rf(id)
   352  	} else {
   353  		r0 = ret.Error(0)
   354  	}
   355  
   356  	return r0
   357  }