From 1c1a99038e344d7b18c0cfa83f2109a24cb7742e Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Fri, 30 Oct 2015 00:38:42 -0700 Subject: [PATCH] ensure docker network inspect is the same as the engine one Signed-off-by: Victor Vieux --- test/integration/api/network.bats | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/integration/api/network.bats b/test/integration/api/network.bats index f84834ba17..9ad9e32c52 100644 --- a/test/integration/api/network.bats +++ b/test/integration/api/network.bats @@ -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" { @@ -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\": {}"* ]] }