Open FalcoSuessgott opened 2 weeks ago
I couldn't find anything in the goss-org/goss
code nor documentation that allows one to tell Goss itself to write the test results to an output file.
I like that this provisioner has a possible workaround for that, but this also seems like something that should be an argument on goss validate
that this provisioner simply has to inject if configured.
I may take a look and see how hard it'd be to add that functionality to goss
. In the event that it does get added, I'd expect that this provisioner would just have to switch from using tee
to injecting the argument instead.
You could look at utilizing Tee-Object
for the Windows use case.
Thanks for the tip. I will have a look at it on the weekend. I agree with this, should have already been an option in upstream goss. Maybe you can have a look at it :D
Oh this actually is a request in goss
already: https://github.com/goss-org/goss/issues/875.
You could look at utilizing
Tee-Object
for the Windows use case.
Is this included in the default powershell installation in all Windows Versions?
I think so. It's part of Microsoft.PowerShell.Utility
. Which, I'm fairly certain, has been included on Windows installations for a while - especially server OS flavors.
Microsoft is even nice enough to include a tee
alias.
I guess I wouldn't say all Windows versions. But it would appear to be present on pretty much anything anybody would be building today. The documentation links I included show it going as far back as PowerShell 5.0, which was released in February of 2016.
If you want to be cautious, you could simply include in the documentation for the new output argument/parameter that, when using it on Windows, PowerShell is expected to be present at a version of at least 5.0 or higher due to the dependency on Tee-Object
.
Thanks for the information. Will update the PR accordingly and hopefully get it merged very soon.
Alright, added some more examples/docs and implemented the Windows Version using Tee-Object
, now waiting for some reviews
merge after #99 fixes #89
Changes
README.md
with a new more up-to-date example showcasing how to use the provisioner easily locallyexamples/
examples/vbox
tee
(Linux) andTee-Object
(Windows)Example
running
make local
will build & install the plugin and execute it: