mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/types/container: move container options to client
Move the option-types to the client and in some cases create a copy for the backend. These types are used to construct query- args, and not marshaled to JSON, and can be replaced with functional options in the client. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
containertypes "github.com/moby/moby/api/types/container"
|
||||
"github.com/moby/moby/client"
|
||||
"github.com/moby/moby/v2/integration/internal/container"
|
||||
"github.com/moby/moby/v2/testutil"
|
||||
@@ -66,7 +65,7 @@ func testMigrateSnapshotter(t *testing.T, graphdriver, snapshotter string) {
|
||||
assert.Equal(t, info.Driver, graphdriver)
|
||||
assert.Equal(t, info.Containers, 1)
|
||||
assert.Equal(t, info.Images, allImages)
|
||||
container.Remove(ctx, t, apiClient, containerID, containertypes.RemoveOptions{
|
||||
container.Remove(ctx, t, apiClient, containerID, client.ContainerRemoveOptions{
|
||||
Force: true,
|
||||
})
|
||||
|
||||
@@ -85,7 +84,7 @@ func testMigrateSnapshotter(t *testing.T, graphdriver, snapshotter string) {
|
||||
c.Config.Cmd = []string{"echo", "hello"}
|
||||
})
|
||||
assert.Equal(t, result.ExitCode, 0)
|
||||
container.Remove(ctx, t, apiClient, result.ContainerID, containertypes.RemoveOptions{})
|
||||
container.Remove(ctx, t, apiClient, result.ContainerID, client.ContainerRemoveOptions{})
|
||||
}
|
||||
|
||||
func TestMigrateSaveLoad(t *testing.T) {
|
||||
@@ -158,5 +157,5 @@ func TestMigrateSaveLoad(t *testing.T) {
|
||||
c.Config.Cmd = []string{"echo", "hello"}
|
||||
})
|
||||
assert.Equal(t, result.ExitCode, 0)
|
||||
container.Remove(ctx, t, apiClient, result.ContainerID, containertypes.RemoveOptions{})
|
||||
container.Remove(ctx, t, apiClient, result.ContainerID, client.ContainerRemoveOptions{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user