Skip to content

Commit 2dd9faa

Browse files
committed
Enable TestBuildWithHugeFile on Windows
This reproduces moby#40444, based on a suggestion from GitHub user @marosset Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
1 parent 0bad482 commit 2dd9faa

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

integration/build/build_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,22 @@ RUN [ ! -f foo ]
488488
}
489489

490490
// #37581
491+
// #40444 (Windows Containers only)
491492
func TestBuildWithHugeFile(t *testing.T) {
492-
skip.If(t, testEnv.OSType == "windows")
493493
ctx := context.TODO()
494494
defer setupTest(t)()
495495

496496
dockerfile := `FROM busybox
497-
# create a sparse file with size over 8GB
497+
`
498+
499+
if testEnv.DaemonInfo.OSType == "windows" {
500+
dockerfile += `# create a file with size of 8GB
501+
RUN powershell "fsutil.exe file createnew bigfile.txt 8589934592 ; dir bigfile.txt"`
502+
} else {
503+
dockerfile += `# create a sparse file with size over 8GB
498504
RUN for g in $(seq 0 8); do dd if=/dev/urandom of=rnd bs=1K count=1 seek=$((1024*1024*g)) status=none; done && \
499505
ls -la rnd && du -sk rnd`
506+
}
500507

501508
buf := bytes.NewBuffer(nil)
502509
w := tar.NewWriter(buf)

0 commit comments

Comments
 (0)