mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove TestContainerAPICreateWithHostName
TestNISDomainname in the integration suite covers this
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2b5880c2eb
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
11e2802015
commit
e1b045c25e
1 changed files with 0 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue