Files
docker-docs/test/integration/api/version.bats
Andrea Luzzardi 85464cdc7c integration: split api into individual tests
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-06 00:35:55 -07:00

25 lines
443 B
Bash

#!/usr/bin/env bats
load ../helpers
function teardown() {
swarm_manage_cleanup
stop_docker
}
@test "docker version" {
start_docker 3
swarm_manage
# 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 ]]
}