mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 05:01:28 +00:00
add test-integration-cli specifics for userns
Signed-off-by: Jessica Frazelle <acidburn@docker.com> Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
committed by
Phil Estes
parent
44e1023a93
commit
ea3afdad61
@@ -2,10 +2,11 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/go-check/check"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestLinksPingUnlinkedContainers(c *check.C) {
|
||||
@@ -233,7 +234,7 @@ func (s *DockerSuite) TestLinkShortDefinition(c *check.C) {
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestLinksNetworkHostContainer(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
testRequires(c, DaemonIsLinux, NotUserNamespace)
|
||||
dockerCmd(c, "run", "-d", "--net", "host", "--name", "host_container", "busybox", "top")
|
||||
out, _, err := dockerCmdWithError("run", "--name", "should_fail", "--link", "host_container:tester", "busybox", "true")
|
||||
if err == nil || !strings.Contains(out, "--net=host can't be used with links. This would result in undefined behavior") {
|
||||
@@ -242,7 +243,7 @@ func (s *DockerSuite) TestLinksNetworkHostContainer(c *check.C) {
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestLinksEtcHostsRegularFile(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
testRequires(c, DaemonIsLinux, NotUserNamespace)
|
||||
out, _ := dockerCmd(c, "run", "--net=host", "busybox", "ls", "-la", "/etc/hosts")
|
||||
if !strings.HasPrefix(out, "-") {
|
||||
c.Errorf("/etc/hosts should be a regular file")
|
||||
|
||||
Reference in New Issue
Block a user