File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ run_test() {
2727 run ./wrapper_test.sh " ${LOG} " " $1 " " ${@: 2} "
2828}
2929
30+ run_test_failure () {
31+ bats_require_minimum_version 1.5.0
32+ failure_code=$1
33+ run -$1 ./wrapper_test.sh " ${LOG} " " $2 " " ${@: 3} "
34+ }
35+
3036# SETUP AND TEARDOWN
3137
3238setup () {
@@ -125,7 +131,8 @@ teardown() {
125131
126132@test " Test SSH connection with false command" {
127133 ./kinit_test.sh keytab
128- run_test ./ssh_test.sh bob krb5-service-example-com.example.com ' -o PreferredAuthentications=gssapi-with-mic' ' ' ' unknown'
134+ # shellcheck disable=SC2086
135+ run_test_failure 127 ./ssh_test.sh bob krb5-service-example-com.example.com ' -o PreferredAuthentications=gssapi-with-mic' ' ' ' unknown'
129136 # Unknown command
130137 [[ " $status " -eq 127 ]] || failure
131138 ./kdestroy_test.sh
You can’t perform that action at this time.
0 commit comments