Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone. - Move windows partition isolation detection to the client, so the driver doesn't use external types. Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079 Component: engine
This commit is contained in:
@@ -16,10 +16,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
containertypes "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/pkg/integration"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/docker/docker/pkg/stringid"
|
||||
"github.com/docker/docker/runconfig"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
@@ -678,7 +678,7 @@ func UtilCreateNetworkMode(c *check.C, networkMode string) {
|
||||
|
||||
var containerJSON types.ContainerJSON
|
||||
c.Assert(json.Unmarshal(body, &containerJSON), checker.IsNil)
|
||||
c.Assert(containerJSON.HostConfig.NetworkMode, checker.Equals, runconfig.NetworkMode(networkMode), check.Commentf("Mismatched NetworkMode"))
|
||||
c.Assert(containerJSON.HostConfig.NetworkMode, checker.Equals, containertypes.NetworkMode(networkMode), check.Commentf("Mismatched NetworkMode"))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestContainerApiCreateWithCpuSharesCpuset(c *check.C) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/docker/docker/runconfig"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
@@ -281,7 +281,7 @@ func (s *DockerSuite) TestInspectTimesAsRFC3339Nano(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectLogConfigNoType(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
dockerCmd(c, "create", "--name=test", "--log-opt", "max-file=42", "busybox")
|
||||
var logConfig runconfig.LogConfig
|
||||
var logConfig container.LogConfig
|
||||
|
||||
out, err := inspectFieldJSON("test", "HostConfig.LogConfig")
|
||||
c.Assert(err, checker.IsNil, check.Commentf("%v", out))
|
||||
|
||||
Reference in New Issue
Block a user