mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add integration test for xz path issue
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com> Conflicts: integration-cli/docker_cli_build_test.go
This commit is contained in:
parent
313a1b7620
commit
0e9a7bc3ce
1 changed files with 29 additions and 0 deletions
|
@ -3468,3 +3468,32 @@ func TestBuildSymlinkBreakout(t *testing.T) {
|
|||
}
|
||||
logDone("build - symlink breakout")
|
||||
}
|
||||
|
||||
func TestBuildXZHost(t *testing.T) {
|
||||
name := "testbuildxzhost"
|
||||
defer deleteImages(name)
|
||||
|
||||
ctx, err := fakeContext(`
|
||||
FROM busybox
|
||||
ADD xz /usr/local/sbin/
|
||||
RUN chmod 755 /usr/local/sbin/xz
|
||||
ADD test.xz /
|
||||
RUN [ ! -e /injected ]`,
|
||||
map[string]string{
|
||||
"test.xz": "\xfd\x37\x7a\x58\x5a\x00\x00\x04\xe6\xd6\xb4\x46\x02\x00" +
|
||||
"\x21\x01\x16\x00\x00\x00\x74\x2f\xe5\xa3\x01\x00\x3f\xfd" +
|
||||
"\x37\x7a\x58\x5a\x00\x00\x04\xe6\xd6\xb4\x46\x02\x00\x21",
|
||||
"xz": "#!/bin/sh\ntouch /injected",
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer ctx.Close()
|
||||
|
||||
if _, err := buildImageFromContext(name, ctx, true); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
logDone("build - xz host is being used")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue