1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Updates some integration tests to fix userns builds

- `TestRunMountReadOnlyDevShm` and `TestRunHostnameInHostMode` needs
  `NotUserNamespace` requirement as these are known limitation of
  userns.
- `TestBuildWorkdirCmd` should use a preload image (`busybox`) instead
  of one that require network access.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2017-01-02 19:13:26 +01:00
parent 8a3ede3d5d
commit bc19388fb2
No known key found for this signature in database
GPG key ID: 083CC6FD6EB699A3
2 changed files with 4 additions and 4 deletions

View file

@ -7386,12 +7386,12 @@ LABEL a=b
c.Assert(strings.TrimSpace(out), checker.Equals, `["sh"]`)
}
// Test case for 28902/28090
// Test case for 28902/28909
func (s *DockerSuite) TestBuildWorkdirCmd(c *check.C) {
testRequires(c, DaemonIsLinux)
dockerFile := `
FROM golang:1.7-alpine
FROM busybox
WORKDIR /
`
_, err := buildImage("testbuildworkdircmd", dockerFile, false)

View file

@ -4635,7 +4635,7 @@ func (s *delayedReader) Read([]byte) (int, error) {
// #28823 (originally #28639)
func (s *DockerSuite) TestRunMountReadOnlyDevShm(c *check.C) {
testRequires(c, SameHostDaemon, DaemonIsLinux)
testRequires(c, SameHostDaemon, DaemonIsLinux, NotUserNamespace)
emptyDir, err := ioutil.TempDir("", "test-read-only-dev-shm")
c.Assert(err, check.IsNil)
defer os.RemoveAll(emptyDir)
@ -4648,7 +4648,7 @@ func (s *DockerSuite) TestRunMountReadOnlyDevShm(c *check.C) {
// Test case for 29129
func (s *DockerSuite) TestRunHostnameInHostMode(c *check.C) {
testRequires(c, DaemonIsLinux)
testRequires(c, DaemonIsLinux, NotUserNamespace)
expectedOutput := "foobar\nfoobar"
out, _ := dockerCmd(c, "run", "--net=host", "--hostname=foobar", "busybox", "sh", "-c", `echo $HOSTNAME && hostname`)