Skip to content

Commit 71a7ce5

Browse files
committed
Add test for container-to-container communication on the same network
Test connection from public_webapp to local_webapp to verify containers on the same bridge network can communicate with each other.
1 parent c297647 commit 71a7ce5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Vagrantfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,10 @@ DOCKERFILE
402402
# get the ip address of public_webapp
403403
public_webapp_ip=$(docker inspect public_webapp | jq -r '.[0].NetworkSettings.Networks."bridge".IPAddress')
404404
test-webapp ! --container "internal-multinet-app" "http://$public_webapp_ip:80" # Should fail (different networks)
405+
406+
# get the ip address of local_webapp
407+
local_webapp_ip=$(docker inspect local_webapp | jq -r '.[0].NetworkSettings.Networks."bridge".IPAddress')
408+
test-webapp --container "public_webapp" "http://$local_webapp_ip:80"
405409
406410
# --- New Overlay Network Verification ---
407411
echo "=== Verifying Overlay Network Services ==="

0 commit comments

Comments
 (0)