Skip to content

Commit

Permalink
test: fast-fail update
Browse files Browse the repository at this point in the history
Add tests that exercise '-k' option
  • Loading branch information
Jerry Mannil committed Jun 14, 2022
1 parent 36f2f56 commit c94c3ca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/t2001-ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,20 @@ test_expect_success 'ssh works with pdsh -S and multiple targets' '
done
'
unset PDSH_SSH_ARGS
test_expect_success 'ssh works with pdsh -k' '
TEST_EXIT_CODE=$(random 254) &&
export PDSH_SSH_ARGS="-n%n -i0 -e$TEST_EXIT_CODE"
test_expect_code "1" pdsh -Rssh -k -w foo0 command
'
unset PDSH_SSH_ARGS
test_expect_success 'ssh works with pdsh -k and multiple targets' '
for n in $(seq 1 24); do
TEST_EXIT_CODE=$(random 254) &&
FAILING_RANK=$(random $n) &&
export PDSH_SSH_ARGS="-n%n -i$FAILING_RANK -e$TEST_EXIT_CODE"
test_expect_code "1" pdsh -Rssh -k -wfoo[0-$n] command
done
'
unset PDSH_SSH_ARGS

test_done

0 comments on commit c94c3ca

Please sign in to comment.