Skip to content

Add windows recycle bin test and update hcsshim to v0.6.11 #36994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions integration-cli/docker_api_build_windows_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// +build windows

package main

import (
"net/http"

"github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/internal/test/fakecontext"
"github.com/docker/docker/internal/test/request"
"github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/assert"
is "github.com/gotestyourself/gotestyourself/assert/cmp"
)

func (s *DockerSuite) TestBuildWithRecycleBin(c *check.C) {
testRequires(c, DaemonIsWindows)

dockerfile := "" +
"FROM " + testEnv.PlatformDefaults.BaseImage + "\n" +
"RUN md $REcycLE.biN && md missing\n" +
"RUN dir $Recycle.Bin && exit 1 || exit 0\n" +
"RUN dir missing\n"

ctx := fakecontext.New(c, "", fakecontext.WithDockerfile(dockerfile))
defer ctx.Close()

res, body, err := request.Post(
"/build",
request.RawContent(ctx.AsTarReader(c)),
request.ContentType("application/x-tar"))

c.Assert(err, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusOK)

out, err := request.ReadBody(body)
assert.NilError(c, err)
assert.Check(c, is.Contains(string(out), "Successfully built"))
}
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# the following lines are in sorted order, FYI
github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109
github.com/Microsoft/hcsshim v0.6.10
github.com/Microsoft/hcsshim v0.6.11
github.com/Microsoft/go-winio v0.4.6
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git
Expand Down
33 changes: 27 additions & 6 deletions vendor/github.com/Microsoft/hcsshim/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/Microsoft/hcsshim/legacy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.