aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2019-10-08 16:31:27 +0200
committerLinus Nordberg <linus@nordberg.se>2019-10-08 16:32:17 +0200
commit830c9ea1f8db796ab7919a4268464517ef1d3762 (patch)
tree7a8e5a47df9b36c9c5b10427ed9ce8c901cd65b1
parentdon't expect 0/32 or ::/128 to be in allowedips (diff)
downloadwg-dynamic-830c9ea1f8db796ab7919a4268464517ef1d3762.tar.xz
wg-dynamic-830c9ea1f8db796ab7919a4268464517ef1d3762.zip
have tests reflect changes to how "no address" is reported by server
-rwxr-xr-xtests/clientsh.bash13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/clientsh.bash b/tests/clientsh.bash
index bc584f4..2ead38e 100755
--- a/tests/clientsh.bash
+++ b/tests/clientsh.bash
@@ -239,11 +239,11 @@ test_case_2() {
pretty 4 "Extend v4, drop v6"
req_check 4 $C4_FIRST_V4 "-"
- [[ ${ERRNO[4]} = 0 ]] || fail "errno: ${ERRNO[4]}"
- [[ ${IPV4[4]} = $C4_FIRST_V4 ]] || fail "ipv4: ${IPV4[4]}"
- [[ -z "${IPV6[4]}" ]] || fail "ipv6: ${IPV6[4]}"
+ [[ ${ERRNO[4]} = 0 ]] || fail "errno: ${ERRNO[4]} != 0"
+ [[ ${IPV4[4]} = $C4_FIRST_V4 ]] || fail "ipv4: ${IPV4[4]} != $C4_FIRST_V4"
+ [[ ${IPV6[4]} = ::/128 ]] || fail "ipv6: ${IPV6[4]} != ::/128"
- pretty 5 "Requesting the v4 of client 4 and no v6 => errno=0 and no addrs"
+ pretty 5 "Requesting the v4 of client 4 and no v6 => errno=2"
req 5 $C4_FIRST_V4 "-"
[[ ${ERRNO[5]} = 2 ]] || fail "errno: ${ERRNO[5]}"
[[ -z "${IPV4[5]}" ]] || fail "ipv4 not empty: ${IPV4[5]}"
@@ -253,8 +253,9 @@ test_case_2() {
pp sleep ${LEASETIME[4]}
req_check 5 $C4_FIRST_V4 "-"
[[ ${ERRNO[5]} = 0 ]] || fail "errno: ${ERRNO[5]}"
- [[ ${IPV4[5]} = $C4_FIRST_V4 ]] || fail "ipv4: ${IPV4[5]}"
- [[ -z "${IPV6[5]}" ]] || fail "ipv6 not empty: ${IPV6[5]}"
+ [[ ${IPV4[5]} = $C4_FIRST_V4 ]] || fail "ipv4: ${IPV4[5]} != $C4_FIRST_V4"
+ [[ ${IPV6[5]} = ::/128 ]] || fail "ipv6: ${IPV6[5]} != ::/128"
+
pretty "" "SUCCESS\n"
}