mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05: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>
This commit is contained in:
parent
45a8f68026
commit
f453261b4a
1 changed files with 12 additions and 4 deletions
|
@ -13,12 +13,20 @@ import (
|
||||||
|
|
||||||
func (s *DockerSuite) TestBuildApiDockerFileRemote(c *check.C) {
|
func (s *DockerSuite) TestBuildApiDockerFileRemote(c *check.C) {
|
||||||
testRequires(c, NotUserNamespace)
|
testRequires(c, NotUserNamespace)
|
||||||
server, err := fakeStorage(map[string]string{
|
var testD string
|
||||||
"testD": `FROM busybox
|
if daemonPlatform == "windows" {
|
||||||
|
testD = `FROM busybox
|
||||||
COPY * /tmp/
|
COPY * /tmp/
|
||||||
RUN find / -name ba*
|
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)
|
c.Assert(err, checker.IsNil)
|
||||||
defer server.Close()
|
defer server.Close()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue