-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Labels
Description
Thanks for all the hard work on this utility, I've found it really easy to use.
I use a simple bash script to run tests depending on different facter facts on hosts. However, I'd like to be able to tell failing tests from synctactically incorrect tests, e.g.:
#============ The test which should fail:
lan1:~ # cat goss_incorrect.yaml
port:
tcp:22:
listening: false
lan1:~ # goss --gossfile goss_incorrect.yaml validate -f tap
Error: Could not parse resource Port:tcp:22
lan1:~ # echo $?
1
#============ The incorrect test:
lan1:~ # cat goss_failing.yaml
port:
tcp:22:
listening: false
lan1:~ # goss --gossfile goss_failing.yaml validate -f tap
1..1
not ok 1 - Port: tcp:22: listening: doesn't match, expect: [false] found: [true]
lan1:~ # echo $?
1
I believe having a separate exit code for YAML parsing/template rendering would make scripting easier.
kwaio, kevinreddot and naftulikay