From 47fbfd3799b7dc5d3a0dad7076b5b1b14d5b406f Mon Sep 17 00:00:00 2001 From: mwrock Date: Thu, 25 Jun 2020 17:58:44 -0700 Subject: fix habitat based windows service tests Signed-off-by: mwrock --- habitat/tests/spec.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'habitat') diff --git a/habitat/tests/spec.ps1 b/habitat/tests/spec.ps1 index ab1656b221..0229ac487f 100644 --- a/habitat/tests/spec.ps1 +++ b/habitat/tests/spec.ps1 @@ -10,6 +10,13 @@ $chef_gem_root = (hab pkg exec $PackageIdentifier gem.cmd which chef | Split-Pat try { Push-Location $chef_gem_root $env:PATH = "C:\hab\bin;$env:PATH" + + # Put chef's GEM_PATH in the machine environment so that the windows service + # tests will be able to consume the win32-service gem + $pkgEnv = hab pkg env $PackageIdentifier + $gemPath = $pkgEnv | Where-Object { $_.StartsWith("`$env:GEM_PATH=") } + SETX GEM_PATH $($gemPath.Split("=")[1]) /m + hab pkg binlink --force $PackageIdentifier /hab/bin/rspec --format progress --tag ~executables --tag ~choco_installed spec/functional if (-not $?) { throw "functional testing failed"} -- cgit v1.2.1