Skip to content

Commit

Permalink
In 0.3.14, command assertions that wrap powershell can no longer asse…
Browse files Browse the repository at this point in the history
…rt against stdout/stderr successfully (#651)

* Allow command assertion to have configurable shell

In 0.3.14, my command assertions that used powershell.exe to run powershell started to fail, and I suspect the new cmd /c wrapping, so I'm adding an integration test first, then if that fails I'll try to make changes to allow it to pass - I'm expecting to want to make it possible to use powershell as the shell within command assertions to achieve that.

* Hah, of course fails mac

* Adjust quoting per #651 (comment)

* wipe away recon
  • Loading branch information
Peter Mounce authored Dec 8, 2020
1 parent eed9450 commit 8e7af4a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions integration-tests/goss/windows/tests/command.goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ command:
- hello world
stderr: []
timeout: 10000
wrap a powershell - expect 0 because travis does not restrict anonymous logins:
exec: powershell -noprofile -noninteractive -command (get-itemproperty -path 'HKLM:/SYSTEM/CurrentControlSet/Control/Lsa/').restrictanonymous
exit-status: 0
stdout:
- 0
stderr: []
timeout: 10000

0 comments on commit 8e7af4a

Please sign in to comment.