aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2019-10-08 16:32:38 +0200
committerLinus Nordberg <linus@nordberg.se>2019-10-08 16:32:38 +0200
commit402f7b3d65c13bf0847b72d3f377525491efb249 (patch)
tree5eeca2d8053d0e00a66dc75f3e38ab0e36a48bcb
parenthave tests reflect changes to how "no address" is reported by server (diff)
downloadwg-dynamic-402f7b3d65c13bf0847b72d3f377525491efb249.tar.xz
wg-dynamic-402f7b3d65c13bf0847b72d3f377525491efb249.zip
test releasing of v4 and extending of v6ln/merge
-rwxr-xr-xtests/clientsh.bash19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/clientsh.bash b/tests/clientsh.bash
index 2ead38e..4e2e5f4 100755
--- a/tests/clientsh.bash
+++ b/tests/clientsh.bash
@@ -256,12 +256,31 @@ test_case_2() {
[[ ${IPV4[5]} = $C4_FIRST_V4 ]] || fail "ipv4: ${IPV4[5]} != $C4_FIRST_V4"
[[ ${IPV6[5]} = ::/128 ]] || fail "ipv6: ${IPV6[5]} != ::/128"
+ pretty "" "SUCCESS\n"
+}
+
+test_case_3() {
+ # Two clients -- 6 and 7.
+ for i in 6 7; do setup_client_peer $i; done
+
+ pretty 6 "Any v4, any v6"
+ req_check 6
+ [[ ${ERRNO[6]} = 0 ]] || fail "errno: ${ERRNO[6]}"
+ local C6_FIRST_V4=${IPV4[6]}
+ local C6_FIRST_V6=${IPV6[6]}
+
+ pretty 6 "Drop v4, extend v6"
+ req_check 6 "-" $C6_FIRST_V6
+ [[ ${ERRNO[6]} = 0 ]] || fail "errno: ${ERRNO[6]} != 0"
+ [[ ${IPV4[6]} = 0.0.0.0/32 ]] || fail "ipv4: ${IPV4[6]} != 0.0.0.0/32"
+ [[ ${IPV6[6]} = $C6_FIRST_V6 ]] || fail "ipv6: ${IPV6[6]} != $C6_FIRST_V6"
pretty "" "SUCCESS\n"
}
test_case_1
test_case_2
+test_case_3
N_RANDOM=20
K_RANDOM=4