Add "accepted exit codes" to "run"
I
Idan
Some commands might "fail" with an error code != 0; and this might be an accepted or even expected behaviour.
If we'll have for example: "exit_codes:" with a list of accepted exit codes determine what is "okay" and what is not, it will further allow facilitation of negative testing.
Right now the best way (AFAIK) to achieve similar results is via a bash script that deals with the exit code as needed.
If dealing with simple negative testing, one use e.g.:
- run: bash -c "my_command_that_should_fail; if [[ \$? -eq 0 ]] ; then exit 1 ; else exit 0 ; fi"
CCI-I-955
I
Idan
Edited to reflect a working version of a bash command for negative testing.