Add e2e test for fixe IP address

This commit is contained in:
kaiyou 2020-06-22 18:29:17 +02:00
parent a52d693f56
commit a420769bd4
1 changed files with 13 additions and 0 deletions

View File

@ -161,6 +161,19 @@ test_rejoin() {
stop_test_container test1-orig 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 '\<test_.*$'); do for test_func in $(declare -F | grep -Eo '\<test_.*$'); do
echo "--- Running $test_func:" echo "--- Running $test_func:"
$test_func $test_func