Skip to content
Snippets Groups Projects
Unverified Commit 906661a0 authored by Steve Azzopardi's avatar Steve Azzopardi
Browse files

Remove `ContainerWait` from docker client

`ContainerWait` is not being used anywhere at this point, there are
plans to use it as a replacement for gitlab-runner `waitForContainer`
func over at  https://gitlab.com/gitlab-org/gitlab-runner/issues/3918,
but in the mean time it should be removed since it's dead code.
parent 52ad8eca
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,6 @@ type Client interface {
ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
ContainerWait(ctx context.Context, containerID string) (int64, error)
ContainerKill(ctx context.Context, containerID, signal string) error
ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
......
......@@ -200,27 +200,6 @@ func (_m *MockClient) ContainerStart(ctx context.Context, containerID string, op
return r0
}
// ContainerWait provides a mock function with given fields: ctx, containerID
func (_m *MockClient) ContainerWait(ctx context.Context, containerID string) (int64, error) {
ret := _m.Called(ctx, containerID)
var r0 int64
if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok {
r0 = rf(ctx, containerID)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, containerID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ImageImportBlocking provides a mock function with given fields: ctx, source, ref, options
func (_m *MockClient) ImageImportBlocking(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) error {
ret := _m.Called(ctx, source, ref, options)
......
......@@ -86,12 +86,6 @@ func (c *officialDockerClient) ContainerStart(ctx context.Context, containerID s
return wrapError("ContainerCreate", err, started)
}
func (c *officialDockerClient) ContainerWait(ctx context.Context, containerID string) (int64, error) {
started := time.Now()
result, err := c.client.ContainerWait(ctx, containerID)
return result, wrapError("ContainerWait", err, started)
}
func (c *officialDockerClient) ContainerKill(ctx context.Context, containerID string, signal string) error {
started := time.Now()
err := c.client.ContainerKill(ctx, containerID, signal)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment