Skip to content

Commit

Permalink
Update 'mco ping' test.
Browse files Browse the repository at this point in the history
Return code is not expected to be 0, so we test the output instead.
  • Loading branch information
zts committed Jun 17, 2014
1 parent 458a55b commit f309bac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion test/integration/activemq/bats/mcollective.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@

@test "server responds to mcollective ping" {
run sudo mco ping -I `hostname`
[ $status -eq 0 ]
[ $(echo "$output" | grep -c `hostname`) -eq 1 ]
}

@test "the kitchen user can run mco ping" {
run sudo -u kitchen mco ping -I `hostname`
[ $(echo "$output" | grep -c `hostname`) -eq 1 ]
}

@test "server has the mcollective chef agent installed " {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/rabbitmq/bats/mcollective.bats
4 changes: 2 additions & 2 deletions test/integration/redis/bats/mcollective.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

@test "server responds to mcollective ping" {
run sudo mco ping -I `hostname`
[ $status -eq 0 ]
[ $(echo "$output" | grep -c `hostname`) -eq 1 ]
}

@test "the kitchen user can run mco ping" {
run sudo -u kitchen mco ping -I `hostname`
[ $status -eq 0 ]
[ $(echo "$output" | grep -c `hostname`) -eq 1 ]
}

@test "server has the mcollective chef agent installed " {
Expand Down

0 comments on commit f309bac

Please sign in to comment.