about summary refs log tree commit diff
path: root/src/testsuite/whois-test.e
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2014-04-17 23:57:38 +0200
committerAlexander Barton <alex@barton.de>2014-06-09 02:15:52 +0200
commit3f807e104572b38143a1015be57d875088ceaebb (patch)
tree1bf5dec4fd7be6709396d4ca99a186199a3c7c94 /src/testsuite/whois-test.e
parent39b8fc65b69c7534228e314c08604341bdf6125f (diff)
downloadngircd-3f807e104572b38143a1015be57d875088ceaebb.tar.gz
ngircd-3f807e104572b38143a1015be57d875088ceaebb.zip
Test suite: Don't use DNS lookups
Different operating systems do behave quite differently when doing DNS
lookups, for example "127.0.0.1" sometimes resolves to "localhost" and
sometimes to "localhost.localdomain" (for example OpenBSD). And other
systems resolve "localhost" to the real host name (for example Cygwin).

So not using DNS at all makes the test site much more portable.
Diffstat (limited to 'src/testsuite/whois-test.e')
-rw-r--r--src/testsuite/whois-test.e14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/testsuite/whois-test.e b/src/testsuite/whois-test.e
index 16b1184b..44eee668 100644
--- a/src/testsuite/whois-test.e
+++ b/src/testsuite/whois-test.e
@@ -1,7 +1,7 @@
 # ngIRCd test suite
 # WHOIS test
 
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
 expect {
 	timeout { exit 1 }
 	"Connected"
@@ -17,7 +17,7 @@ expect {
 send "whois nick\r"
 expect {
 	timeout { exit 1 }
-	"311 nick nick ~user localhost* \* :Real Name\r"
+	"311 nick nick ~user 127.0.0.1 \* :Real Name\r"
 }
 expect {
 	timeout { exit 1 }
@@ -27,25 +27,25 @@ expect {
 send "whois *\r"
 expect {
 	timeout { exit 1 }
-	"311 nick nick ~user localhost* \* :Real Name\r"
+	"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
 }
 
 send "whois n*\r"
 expect {
 	timeout { exit 1 }
-	"311 nick nick ~user localhost* \* :Real Name\r"
+	"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
 }
 
 send "whois ?ick\r"
 expect {
 	timeout { exit 1 }
-	"311 nick nick ~user localhost* \* :Real Name\r"
+	"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
 }
 
 send "whois ????,n?*k\r"
 expect {
 	timeout { exit 1 }
-	"311 nick nick ~user localhost* \* :Real Name\r"
+	"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
 }
 
 send "whois unknown\r"
@@ -61,7 +61,7 @@ expect {
 send "whois ngircd.test.server2 nick\r"
 expect {
 	timeout { exit 1 }
-	":ngircd.test.server2 311 nick nick ~user localhost* \* :Real Name\r"
+	":ngircd.test.server2 311 nick nick ~user 127.0.0.1* \* :Real Name\r"
 }
 
 send "whois nosuchserver unknown\r"