mirror of
https://github.com/docker/docs.git
synced 2026-04-01 16:58:54 +07:00
27 lines
467 B
Bash
27 lines
467 B
Bash
#!/usr/bin/env bats
|
|
|
|
load ../helpers
|
|
|
|
function teardown() {
|
|
swarm_manage_cleanup
|
|
stop_docker
|
|
}
|
|
|
|
@test "docker create" {
|
|
start_docker 3
|
|
swarm_manage
|
|
|
|
# make sure no contaienr exist
|
|
run docker_swarm ps -qa
|
|
[ "${#lines[@]}" -eq 0 ]
|
|
|
|
# create
|
|
run docker_swarm create --name test_container busybox sleep 1000
|
|
[ "$status" -eq 0 ]
|
|
|
|
# verify, created container exists
|
|
run docker_swarm ps -l
|
|
[ "${#lines[@]}" -eq 2 ]
|
|
[[ "${lines[1]}" == *"test_container"* ]]
|
|
}
|