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.
This commit is contained in:
parent
39b8fc65b6
commit
3f807e1045
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# Channel test
|
# Channel test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# Idle test
|
# Idle test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# Server connect test
|
# Server connect test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# INVITE test
|
# INVITE test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# JOIN test
|
# JOIN test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# KICK test
|
# KICK test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# PRIVMSG and NOTICE test
|
# PRIVMSG and NOTICE test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
@ -72,24 +72,17 @@ expect {
|
||||||
"MODE nick :-b"
|
"MODE nick :-b"
|
||||||
}
|
}
|
||||||
|
|
||||||
# The following two tests using "localhost" as host name
|
send "privmsg ~user\%127.0.0.1 :test\r"
|
||||||
# had to be disabled, because there are operating systems
|
expect {
|
||||||
# out there, that use "localhost.<domain>" as host name
|
timeout { exit 1 }
|
||||||
# for 127.0.0.1 instead of just "localhost".
|
"@* PRIVMSG nick :test"
|
||||||
# (for example OpenBSD 4, OpenSolaris, ...)
|
}
|
||||||
#
|
|
||||||
#send "privmsg ~user\%localhost :test\r"
|
send "privmsg Nick!~User@127.0.0.1 :test\r"
|
||||||
#expect {
|
expect {
|
||||||
# timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
# "@* PRIVMSG nick :test"
|
"@* PRIVMSG nick :test"
|
||||||
#}
|
}
|
||||||
#
|
|
||||||
#send "privmsg Nick!~User@LocalHost :test\r"
|
|
||||||
#expect {
|
|
||||||
# timeout { exit 1 }
|
|
||||||
# "@* PRIVMSG nick :test"
|
|
||||||
# "401"
|
|
||||||
#}
|
|
||||||
|
|
||||||
send "away :away\r"
|
send "away :away\r"
|
||||||
expect {
|
expect {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# Misc test
|
# Misc test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
@ -130,7 +130,7 @@ expect {
|
||||||
send "userhost nick\r"
|
send "userhost nick\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
-re ":ngircd.test.server 302 nick :?nick=+.*@(localhos.*|127.0.0.1)"
|
-re ":ngircd.test.server 302 nick :?nick=+.*@127.0.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
send "userhost doesnotexist\r"
|
send "userhost doesnotexist\r"
|
||||||
|
@ -142,7 +142,7 @@ expect {
|
||||||
send "userhost nick doesnotexist nick doesnotexist\r"
|
send "userhost nick doesnotexist nick doesnotexist\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
-re ":ngircd.test.server 302 nick :nick=+.*@(localhos.*|127.0.0.1) nick=+.*@(localhos.*|127.0.0.1)"
|
-re ":ngircd.test.server 302 nick :nick=+.*@127.0.0.1 nick=+.*@127.0.0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
send "away :testing\r"
|
send "away :testing\r"
|
||||||
|
@ -154,7 +154,7 @@ expect {
|
||||||
send "userhost nick nick nick nick nick nick\r"
|
send "userhost nick nick nick nick nick nick\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
-re ":ngircd.test.server 302 nick :nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1)\r"
|
-re ":ngircd.test.server 302 nick :nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1\r"
|
||||||
}
|
}
|
||||||
|
|
||||||
send "quit\r"
|
send "quit\r"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# MODE test
|
# MODE test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
OperCanUseMode = yes
|
OperCanUseMode = yes
|
||||||
Ident = no
|
Ident = no
|
||||||
IncludeDir = /var/empty
|
IncludeDir = /var/empty
|
||||||
|
DNS = no
|
||||||
PAM = no
|
PAM = no
|
||||||
|
|
||||||
[Operator]
|
[Operator]
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
OperCanUseMode = yes
|
OperCanUseMode = yes
|
||||||
Ident = no
|
Ident = no
|
||||||
IncludeDir = /var/empty
|
IncludeDir = /var/empty
|
||||||
|
DNS = no
|
||||||
PAM = no
|
PAM = no
|
||||||
|
|
||||||
[Operator]
|
[Operator]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# Op-less channel test
|
# Op-less channel test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# server-server link test
|
# server-server link test
|
||||||
|
|
||||||
spawn telnet localhost 6790
|
spawn telnet 127.0.0.1 6790
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
set timeout 30
|
set timeout 30
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# WHO test
|
# WHO test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
@ -62,7 +62,7 @@ expect {
|
||||||
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
|
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
|
||||||
}
|
}
|
||||||
|
|
||||||
send "who localhos*\r"
|
send "who 127.0.0.*\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
|
||||||
|
@ -120,7 +120,7 @@ expect {
|
||||||
"305 nick"
|
"305 nick"
|
||||||
}
|
}
|
||||||
|
|
||||||
send "who ??cal*ho*\r"
|
send "who ??7.*0*\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
|
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ngIRCd test suite
|
# ngIRCd test suite
|
||||||
# WHOIS test
|
# WHOIS test
|
||||||
|
|
||||||
spawn telnet localhost 6789
|
spawn telnet 127.0.0.1 6789
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"Connected"
|
"Connected"
|
||||||
|
@ -17,7 +17,7 @@ expect {
|
||||||
send "whois nick\r"
|
send "whois nick\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
"311 nick nick ~user localhost* \* :Real Name\r"
|
"311 nick nick ~user 127.0.0.1 \* :Real Name\r"
|
||||||
}
|
}
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
|
@ -27,25 +27,25 @@ expect {
|
||||||
send "whois *\r"
|
send "whois *\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
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"
|
send "whois n*\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
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"
|
send "whois ?ick\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
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"
|
send "whois ????,n?*k\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
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"
|
send "whois unknown\r"
|
||||||
|
@ -61,7 +61,7 @@ expect {
|
||||||
send "whois ngircd.test.server2 nick\r"
|
send "whois ngircd.test.server2 nick\r"
|
||||||
expect {
|
expect {
|
||||||
timeout { exit 1 }
|
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"
|
send "whois nosuchserver unknown\r"
|
||||||
|
|
Loading…
Reference in New Issue