1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

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>
Upstream-commit: f453261b4a53ab71db8b78ea119b4edd69b95ae3
Component: engine
This commit is contained in:
Akihiro Suda
2016-09-19 19:53:14 +00:00
parent 2a72633153
commit 782ab7bfdc

View File

@@ -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()