diff options
author | mwrock <matt@mattwrock.com> | 2020-06-25 17:58:44 -0700 |
---|---|---|
committer | mwrock <matt@mattwrock.com> | 2020-06-25 17:58:44 -0700 |
commit | 47fbfd3799b7dc5d3a0dad7076b5b1b14d5b406f (patch) | |
tree | 295ca0450c7210d86fc3a1e9c26c3d9768618d06 /habitat | |
parent | d54485b2b7d6a00e0005a7ebe0ce2476d91e8e94 (diff) | |
download | chef-47fbfd3799b7dc5d3a0dad7076b5b1b14d5b406f.tar.gz |
fix habitat based windows service tests
Signed-off-by: mwrock <matt@mattwrock.com>
Diffstat (limited to 'habitat')
-rw-r--r-- | habitat/tests/spec.ps1 | 7 |
1 files changed, 7 insertions, 0 deletions
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"} |