Skip to content

Commit

Permalink
fix(windows): fix download paths for windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Aug 14, 2017
1 parent e5285cd commit 18dfef7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions dsl/pact_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ import (
var dir, _ = os.Getwd()
var pactDir = fmt.Sprintf("%s/../pacts", dir)
var logDir = fmt.Sprintf("%s/../log", dir)

var name = "Jean-Marie de La Beaujardière😀😍"

// var name = "boring names"

func TestPact_Integration(t *testing.T) {
// Enable when running E2E/integration tests before a release
if os.Getenv("PACT_INTEGRATED_TESTS") != "" {
Expand Down
11 changes: 4 additions & 7 deletions scripts/pact.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$pactDir = "$env:TEMP\pact"
$pactDir = "$env:APPVEYOR_BUILD_FOLDER\pact"
# $pactDir = "$env:TEMP\pact"
$exitCode = 0

if ($env:PACT_INTEGRATED_TESTS) {
Expand Down Expand Up @@ -26,8 +27,6 @@ go build -o "$pactDir\pact-go.exe" "github.com\pact-foundation\pact-go"

Write-Verbose "--> Creating pact daemon (downloading Ruby binaries)"
$downloadDir = $env:TEMP
$downloadDirMockService = "$pactDir\pact-mock-service"
$downloadDirPRoviderVerifier = "$pactDir\pact-provider-verifier"
$url = "https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.3.1/pact-1.3.1-win32.zip"

Write-Verbose " Downloading $url"
Expand All @@ -39,13 +38,11 @@ if (!(Test-Path "$zip")) {

Write-Verbose " Extracting $zip"
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$zip", $downloadDirMockService)
[System.IO.Compression.ZipFile]::ExtractToDirectory("$zip", $downloadDirPRoviderVerifier)
[System.IO.Compression.ZipFile]::ExtractToDirectory("$zip", $pactDir)

Write-Verbose " Moving binaries into position"
mv $downloadDirMockService/pact/* $pactDir/pact-mock-service/
mv $downloadDirPRoviderVerifier/pact/* $pactDir/pact-provider-verifier/
Get-ChildItem $pactDir
Get-ChildItem $pactDir/pact

Write-Verbose "--> Running tests"
$packages = go list github.com/pact-foundation/pact-go/... | where {$_ -inotmatch 'vendor'} | where {$_ -inotmatch 'examples'}
Expand Down

0 comments on commit 18dfef7

Please sign in to comment.