Skip to content

Commit

Permalink
Remove TestContainerAPICreateWithHostName
Browse files Browse the repository at this point in the history
TestNISDomainname in the integration suite covers this

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Apr 25, 2019
1 parent c91c377 commit 2b5880c
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions integration-cli/docker_api_containers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,29 +623,6 @@ func (s *DockerSuite) TestContainerAPICreateMultipleNetworksConfig(c *check.C) {
c.Assert(msg, checker.Contains, "net3")
}

func (s *DockerSuite) TestContainerAPICreateWithHostName(c *check.C) {
domainName := "test-domain"
hostName := "test-hostname"
config := containertypes.Config{
Image: "busybox",
Hostname: hostName,
Domainname: domainName,
}

cli, err := client.NewClientWithOpts(client.FromEnv)
assert.NilError(c, err)
defer cli.Close()

container, err := cli.ContainerCreate(context.Background(), &config, &containertypes.HostConfig{}, &networktypes.NetworkingConfig{}, "")
assert.NilError(c, err)

containerJSON, err := cli.ContainerInspect(context.Background(), container.ID)
assert.NilError(c, err)

c.Assert(containerJSON.Config.Hostname, checker.Equals, hostName, check.Commentf("Mismatched Hostname"))
c.Assert(containerJSON.Config.Domainname, checker.Equals, domainName, check.Commentf("Mismatched Domainname"))
}

func (s *DockerSuite) TestContainerAPICreateBridgeNetworkMode(c *check.C) {
// Windows does not support bridge
testRequires(c, DaemonIsLinux)
Expand Down

0 comments on commit 2b5880c

Please sign in to comment.