Skip to content

Commit

Permalink
Merge pull request #5341 from hashicorp/ci-windows-docker
Browse files Browse the repository at this point in the history
Run Docker tests in Windows AppVeyor CI
  • Loading branch information
notnoop authored Feb 21, 2019
2 parents 92a3cec + d6250ec commit 55ee03a
Show file tree
Hide file tree
Showing 11 changed files with 113 additions and 77 deletions.
14 changes: 10 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ environment:
GOMAXPROCS: 1

install:
# do basic docker smoke test, and pull image in preparation for tests
- cmd: docker info
- cmd: docker run --rm dantoml/busybox-windows:08012019 echo hi there

- cmd: set PATH=%GOBIN%;c:\go\bin;%PATH%
- cmd: echo %Path%
- cmd: go version
Expand All @@ -31,10 +35,12 @@ install:
build_script:
- cmd: |
set PATH=%GOPATH%/bin;%PATH%
mkdir -p $GOPATH\bin
go build -o $GOPATH\bin\nomad
# test_script:
# - cmd: gotestsum -f short-verbose --junitfile results.xml
go build -o %GOPATH%\bin\nomad.exe
test_script:
# only test docker driver tests for now
- cmd:
gotestsum --junitfile results.xml
github.com/hashicorp/nomad/drivers/docker
# on_finish:
# - ps: |
# Push-AppveyorArtifact (Resolve-Path .\results.xml)
Expand Down
4 changes: 4 additions & 0 deletions client/testutil/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ func DockerIsConnected(t *testing.T) bool {
return runtime.GOOS == "linux"
}

if testutil.IsAppVeyor() {
return runtime.GOOS == "windows"
}

client, err := docker.NewClientFromEnv()
if err != nil {
return false
Expand Down
2 changes: 1 addition & 1 deletion drivers/docker/driver_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestDockerDriver_authFromHelper(t *testing.T) {
}

func TestDockerDriver_PidsLimit(t *testing.T) {
if !tu.IsTravis() {
if !tu.IsCI() {
t.Parallel()
}
testutil.DockerCompatible(t)
Expand Down
Loading

0 comments on commit 55ee03a

Please sign in to comment.