fix api/version.bats

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
Victor Vieux 2015-06-30 15:03:52 -07:00
parent d766fea7a8
commit ca93c2a21a
1 changed files with 1 additions and 5 deletions

View File

@ -15,11 +15,7 @@ function teardown() {
# version
run docker_swarm version
[ "$status" -eq 0 ]
[ "${#lines[@]}" -ge 8 ]
# verify
client_reg='^Client version: [0-9]+\.[0-9]+\.[0-9]+.*$'
server_reg='^Server version: swarm/[0-9]+\.[0-9]+\.[0-9]+.*$'
[[ "${lines[0]}" =~ $client_reg ]]
[[ "${lines[5]}" =~ $server_reg ]]
[[ ${output} =~ 'swarm/' ]]
}