Files
docker-machine/test/integration/cli/ls.bats
Nathan LeClaire ed01843dc9 Refactor integration tests
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-06-02 10:10:52 -07:00

22 lines
561 B
Bash

#!/usr/bin/env bats
load ${BASE_TEST_DIR}/helpers.bash
teardown () {
machine rm testmachine
}
@test "ls: filter on driver" {
run machine create -d none --url tcp://127.0.0.1:2375 testmachine
run machine ls --filter driver=none
[ "$status" -eq 0 ]
[[ ${lines[1]} =~ "testmachine" ]]
}
@test "ls: filter on swarm" {
run machine create -d none --url tcp://127.0.0.1:2375 --swarm --swarm-master --swarm-discovery token://deadbeef testmachine
run machine ls --filter swarm=testmachine
[ "$status" -eq 0 ]
[[ ${lines[1]} =~ "testmachine" ]]
}