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:
@@ -4,11 +4,10 @@ import (
|
||||
"os"
|
||||
"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"
|
||||
"github.com/moby/moby/v2/testutil/daemon"
|
||||
|
||||
"gotest.tools/v3/assert"
|
||||
"gotest.tools/v3/skip"
|
||||
)
|
||||
@@ -45,9 +44,9 @@ func TestCgroupDriverSystemdMemoryLimit(t *testing.T) {
|
||||
ctrID := container.Create(ctx, t, c, func(ctr *container.TestContainerConfig) {
|
||||
ctr.HostConfig.Resources.Memory = mem
|
||||
})
|
||||
defer c.ContainerRemove(ctx, ctrID, containertypes.RemoveOptions{Force: true})
|
||||
defer c.ContainerRemove(ctx, ctrID, client.ContainerRemoveOptions{Force: true})
|
||||
|
||||
err := c.ContainerStart(ctx, ctrID, containertypes.StartOptions{})
|
||||
err := c.ContainerStart(ctx, ctrID, client.ContainerStartOptions{})
|
||||
assert.NilError(t, err)
|
||||
|
||||
s, err := c.ContainerInspect(ctx, ctrID)
|
||||
|
||||
Reference in New Issue
Block a user