DNS lookups should not be case sensitive.
- On-the-wire gossip messages are sorted case sensitive, but in memory they are sorted case-insensitive. - Add test for case insensitive match on multiple names.
This commit is contained in:
1 parent
a3484cce43
commit
357174e351
4 files changed
+104
-30
No files matched your search
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#! /bin/bash
|
||||
|
||||
. ./config.sh
|
||||
|
||||
C1=10.2.0.78
|
||||
C2=10.2.0.79
|
||||
C3=10.2.0.80
|
||||
|
||||
start_suite "DNS lookup case (in)sensitivity"
|
||||
|
||||
weave_on $HOST1 launch
|
||||
|
||||
start_container_with_dns $HOST1 --name=test
|
||||
|
||||
start_container $HOST1 $C1/24 --name=seeone
|
||||
assert_dns_record $HOST1 test seeone.weave.local $C1
|
||||
assert_dns_record $HOST1 test SeeOne.weave.local $C1
|
||||
assert_dns_record $HOST1 test SEEONE.weave.local $C1
|
||||
|
||||
start_container $HOST1 $C2/24 --name=SeEtWo
|
||||
assert_dns_record $HOST1 test seetwo.weave.local $C2
|
||||
assert_dns_record $HOST1 test SeeTwo.weave.local $C2
|
||||
assert_dns_record $HOST1 test SEETWO.weave.local $C2
|
||||
|
||||
start_container $HOST1 $C3/24 --name=seetwo
|
||||
assert_dns_record $HOST1 test seetwo.weave.local $C2 $C3
|
||||
assert_dns_record $HOST1 test SeeTwo.weave.local $C2 $C3
|
||||
assert_dns_record $HOST1 test SEETWO.weave.local $C2 $C3
|
||||
assert "exec_on $HOST1 test dig +short seetwo.weave.local A | grep -v ';;' | wc -l" 2
|
||||
|
||||
end_suite
|
||||
+1
-1
@@ -188,7 +188,7 @@ assert_dns_record() {
|
||||
|
||||
[ -z "$DEBUG" ] || greyly echo "Checking whether the IPs '$@' exists at $host:$container"
|
||||
for ip in "$@" ; do
|
||||
assert "exec_on $host $container getent hosts $ip | tr -s ' '" "$ip $name"
|
||||
assert "exec_on $host $container getent hosts $ip | tr -s ' ' | tr '[:upper:]' '[:lower:]'" "$(echo $ip $name | tr '[:upper:]' '[:lower:]')"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user