diff --git a/test/integration/activemq/bats/mcollective.bats b/test/integration/activemq/bats/mcollective.bats index a91bc3a..6b79741 100644 --- a/test/integration/activemq/bats/mcollective.bats +++ b/test/integration/activemq/bats/mcollective.bats @@ -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 " { diff --git a/test/integration/rabbitmq/bats/mcollective.bats b/test/integration/rabbitmq/bats/mcollective.bats index 3b51aab..c352c7b 120000 --- a/test/integration/rabbitmq/bats/mcollective.bats +++ b/test/integration/rabbitmq/bats/mcollective.bats @@ -1 +1 @@ -../../activemq/bats/mcollective.bats \ No newline at end of file +../../redis/bats/mcollective.bats \ No newline at end of file diff --git a/test/integration/redis/bats/mcollective.bats b/test/integration/redis/bats/mcollective.bats index 66142c9..6b79741 100644 --- a/test/integration/redis/bats/mcollective.bats +++ b/test/integration/redis/bats/mcollective.bats @@ -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 " {