summaryrefslogtreecommitdiff
path: root/habitat/tests/spec.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'habitat/tests/spec.ps1')
-rw-r--r--habitat/tests/spec.ps117
1 files changed, 17 insertions, 0 deletions
diff --git a/habitat/tests/spec.ps1 b/habitat/tests/spec.ps1
new file mode 100644
index 0000000000..5108b6d554
--- /dev/null
+++ b/habitat/tests/spec.ps1
@@ -0,0 +1,17 @@
+param (
+ [Parameter()]
+ [string]$PackageIdentifier = $(throw "Usage: test.ps1 [test_pkg_ident] e.g. test.ps1 ci/user-windows/1.0.0/20190812103929")
+)
+
+# some of the functional tests require that winrm be configured
+winrm quickconfig -quiet
+
+$chef_gem_root = (hab pkg exec $PackageIdentifier gem.cmd which chef | Split-Path | Split-Path)
+try {
+ Push-Location $chef_gem_root
+ hab pkg binlink --force $PackageIdentifier
+ /hab/bin/rspec --format progress --tag ~executables --tag ~choco_installed spec/functional
+ if (-not $?) { throw "functional testing failed"}
+} finally {
+ Pop-Location
+} \ No newline at end of file