Skip to content

Commit

Permalink
fix: make createSimplePact portable on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Aug 14, 2017
1 parent 1836355 commit 2201fe3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ clone_folder: c:\gopath\src\github.com\pact-foundation\pact-go

environment:
GOPATH: c:\gopath
DEPTESTBYPASS501: 1
GOVERSION: 1.8
# PACT_INTEGRATED_TESTS: 0
PACT_BROKER_HOST: "https://test.pact.dius.com.au"
PACT_BROKER_USERNAME: "dXfltyFMgNOFZAxr8io9wJ37iUpY42M"
PACT_BROKER_PASSWORD: "O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1"

init:
- git config --global core.autocrlf input
Expand All @@ -23,6 +26,7 @@ install:
# Install the specific Go version.
- rmdir c:\go /s /q
- appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.msi
# Download the latest pact standalone
- msiexec /i go%GOVERSION%.windows-amd64.msi /q
- choco install bzr
- set Path=c:\go\bin;c:\gopath\bin;C:\Program Files (x86)\Bazaar\;C:\Program Files\Mercurial\%Path%
Expand All @@ -33,5 +37,5 @@ build: false
deploy: false

test_script:
- go build github.com/pact-foundation/pact-go
- for /f "" %%G in ('go list github.com/pact-foundation/pact-go/... ^| find /i /v "/vendor/"') do ( go test -v %%G & IF ERRORLEVEL == 1 EXIT 1)
- go build -o /tmp/pact-go github.com/pact-foundation/pact-go
- for /f "" %%G in ('go list github.com/pact-foundation/pact-go/... ^| find /i /v "/vendor/" ^| find /i /v "examples"') do ( go test -v %%G & IF ERRORLEVEL == 1 EXIT 1)
2 changes: 1 addition & 1 deletion dsl/publish_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func createSimplePact(valid bool) *os.File {
`)
}

tmpfile, err := ioutil.TempFile("/tmp", "pactgo")
tmpfile, err := ioutil.TempFile("", "pactgo")
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit 2201fe3

Please sign in to comment.