From a1d3517aebf3b82ab03fa2e408e09951fb2890e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20K=C5=82os?= Date: Fri, 23 Sep 2022 00:49:48 +0200 Subject: [PATCH] Add integration tests for multiport app --- Vagrantfile | 15 +++++++++++++++ test/bach | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 5ce177c..bfb7f79 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -167,6 +167,18 @@ DOCKERFILE done ufw-docker service allow public_service 80/tcp + + for name in public_multiport; do + webapp="${name}_service" + port_1="23080" + port_2="23443" + if docker service inspect "$webapp" &>/dev/null; then docker service rm "$webapp"; fi + docker service create --name "$webapp" \ + -p "${port_1}:80" -p "${port_2}:443" --env name="$webapp" --replicas 3 #{private_registry}/chaifeng/hostname-webapp + done + + ufw-docker service allow public_multiport 443/tcp + ufw-docker service allow public_multiport 80/tcp SHELL end @@ -203,6 +215,9 @@ DOCKERFILE test-webapp "$server:29090" ! test-webapp "$server:9000" + test-webapp "$server:23080" + test-webapp "$server:23443" + echo "=====================" echo " TEST DONE " echo "=====================" diff --git a/test/bach b/test/bach index 452ebfb..447edb6 160000 --- a/test/bach +++ b/test/bach @@ -1 +1 @@ -Subproject commit 452ebfba3e48fa91b8110a8ddb65379f50d11668 +Subproject commit 447edb60db232d3dbc2267f37c49bd7a070cc83d