gitlab.com/jfprevost/gitlab-runner-notlscheck@v11.11.4+incompatible/executors/docker/internal/volumes/mock_containerClient.go (about)

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