diff options
author | Akihiro Suda <suda.akihiro@lab.ntt.co.jp> | 2016-09-19 19:53:14 +0000 |
---|---|---|
committer | Akihiro Suda <suda.akihiro@lab.ntt.co.jp> | 2016-09-20 14:15:37 +0000 |
commit | f453261b4a53ab71db8b78ea119b4edd69b95ae3 (patch) | |
tree | 462f7961bf15f91e14620b0ab294040b0ac562d7 | |
parent | 45a8f680263558657e98c899204a632153b60cde (diff) | |
download | docker-f453261b4a53ab71db8b78ea119b4edd69b95ae3.tar.gz |
Fix TestBuildApiDockerFileRemote
TestBuildApiDockerFileRemote has been consistently failing (EPERM) on the host
with #26618, which prohibits /sys/firmware from being accessed using apparmor.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
-rw-r--r-- | integration-cli/docker_api_build_test.go | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/integration-cli/docker_api_build_test.go b/integration-cli/docker_api_build_test.go index 04d855cfef..b905d89bbb 100644 --- a/integration-cli/docker_api_build_test.go +++ b/integration-cli/docker_api_build_test.go @@ -13,12 +13,20 @@ import ( func (s *DockerSuite) TestBuildApiDockerFileRemote(c *check.C) { testRequires(c, NotUserNamespace) - server, err := fakeStorage(map[string]string{ - "testD": `FROM busybox + var testD string + if daemonPlatform == "windows" { + testD = `FROM busybox COPY * /tmp/ RUN find / -name ba* -RUN find /tmp/`, - }) +RUN find /tmp/` + } else { + // -xdev is required because sysfs can cause EPERM + testD = `FROM busybox +COPY * /tmp/ +RUN find / -xdev -name ba* +RUN find /tmp/` + } + server, err := fakeStorage(map[string]string{"testD": testD}) c.Assert(err, checker.IsNil) defer server.Close() |