From 506b1e94f9ae72611b4ad2d46dc462627128618d Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Mon, 5 Mar 2018 15:43:36 +0100 Subject: [PATCH] Use run command for bats test --- test/main.bats | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/main.bats b/test/main.bats index 3023333..0f591cc 100755 --- a/test/main.bats +++ b/test/main.bats @@ -12,11 +12,11 @@ teardown() { } @test "simple ssh" { - ssh -p 2223 -i /root/bkctld.key -oStrictHostKeyChecking=no root@127.0.0.1 lastlog -u root - [ "$?" -eq 0 ] + run ssh -p 2223 -i /root/bkctld.key -oStrictHostKeyChecking=no root@127.0.0.1 lastlog -u root + [ "$status" -eq 0 ] } @test "rsync" { - rsync -a -e "ssh -p 2223 -i /root/bkctld.key -oStrictHostKeyChecking=no" /tmp/ root@127.0.0.1:/var/backup/ - [ "$?" -eq 0 ] + run rsync -a -e "ssh -p 2223 -i /root/bkctld.key -oStrictHostKeyChecking=no" /tmp/ root@127.0.0.1:/var/backup/ + [ "$status" -eq 0 ] }