From a420769bd4014231e35cc5886e95c25bc6bb4abf Mon Sep 17 00:00:00 2001 From: kaiyou Date: Mon, 22 Jun 2020 18:29:17 +0200 Subject: [PATCH] Add e2e test for fixe IP address --- tests/e2e.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/e2e.sh b/tests/e2e.sh index 5ce1348..8e24370 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -161,6 +161,19 @@ test_rejoin() { stop_test_container test1-orig } +test_fixed_address() { + run_test_container test1-orig test1 --init --overlay-net 10.10.0.1/16 + run_test_container test2-orig test2 --join test1-orig --overlay-net 10.10.0.0/16 + + sleep 3 + + docker exec test1-orig ping -c1 -W1 test2 || (docker logs test1-orig; docker logs test2-orig; false) + docker exec test2-orig ping -c1 -W1 10.10.0.1 || (docker logs test1-orig; docker logs test2-orig; false) + + stop_test_container test2-orig + stop_test_container test1-orig +} + for test_func in $(declare -F | grep -Eo '\