Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1361 from vieux/improve_network_inspect_test
Browse files Browse the repository at this point in the history
ensure docker network inspect is the same as the engine one
  • Loading branch information
abronan committed Oct 30, 2015
2 parents cb7ddd1 + 1c1a990 commit d395fa5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/integration/api/network.bats
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ function teardown() {
[ "$status" -ne 0 ]

run docker_swarm network inspect node-0/bridge
[[ "${output}" != *"\"containers\": {}"* ]]
[[ "${output}" != *"\"Containers\": {}"* ]]

diff <(docker_swarm network inspect node-0/bridge) <(docker_host -H ${HOSTS[0]} network inspect bridge)
}

@test "docker network create" {
Expand Down Expand Up @@ -75,20 +77,20 @@ function teardown() {
docker_swarm run -d --name test_container -e constraint:node==node-0 busybox sleep 100

run docker_swarm network inspect node-0/bridge
[[ "${output}" != *"\"containers\": {}"* ]]
[[ "${output}" != *"\"Containers\": {}"* ]]

docker_swarm network disconnect node-0/bridge test_container

run docker_swarm network inspect node-0/bridge
[[ "${output}" == *"\"containers\": {}"* ]]
[[ "${output}" == *"\"Containers\": {}"* ]]

docker_swarm network connect node-0/bridge test_container

run docker_swarm network inspect node-0/bridge
[[ "${output}" != *"\"containers\": {}"* ]]
[[ "${output}" != *"\"Containers\": {}"* ]]

docker_swarm rm -f test_container

run docker_swarm network inspect node-0/bridge
[[ "${output}" == *"\"containers\": {}"* ]]
[[ "${output}" == *"\"Containers\": {}"* ]]
}

0 comments on commit d395fa5

Please sign in to comment.