goss-org / goss

Quick and Easy server testing/validation
https://goss.rocks
Apache License 2.0
5.57k stars 472 forks source link

Possible to stipulate all required arguments via 'goss add <resource>? e.g. "goss add file blah exists:true contents:'thing' #694

Closed BeerOpsHQ closed 3 years ago

BeerOpsHQ commented 3 years ago

I love your work first of all. Well done. Great tool!

I'm looking to test http redirects. I can add these via "goss add http http://mysite -r" which is great, but gives me a template with an empty body[]..

I'd love to be able to progamatically do the following...

goss add http http://mysite/2b-redirected -r body:"target-url" or even better... goss add http http://mysite/2b-redirected -r body:"target-url" title:"my awesome title" or the icing on the cake... goss add http http://mysite/2b-redirected -r body:"target-url" title:"my awesome title" meta:my-meta1:"my metadata 1 details"

The above will help me parse source files that contain all of the info I need....then to call goss add with all required arguments on CLI to produce an awesome goss.yml file.

Any of this possible, or on the cards?

BeerOpsHQ commented 3 years ago

Ok...so closing this one as a cracking opportunity for ansible to create the goss.yaml files for me. Still...would be useful to have cli option for adding title and metadata if possible! :)