Update several tests to accept empty string or "localhost"

For unix sockets the behavior of getpeername() is different on different OS

This required to add support of regex to the integration test framework
This commit is contained in:
Alexey Sokolov
2025-04-22 01:10:22 +01:00
parent d8234a1a71
commit 951c39479f
3 changed files with 61 additions and 27 deletions

View File

@@ -490,9 +490,9 @@ TEST_F(ZNCTest, ModpythonSaslAuth) {
client2.Write("AUTHENTICATE FOO");
client2.ReadUntil("AUTHENTICATE " + QByteArrayLiteral("Welcome").toBase64());
client2.Write("AUTHENTICATE +");
client2.ReadUntil(
":irc.znc.in 900 nick nick!user@localhost user :You are now logged in "
"as user");
client2.ReadUntilRe(
":irc.znc.in 900 nick nick!user@(localhost)? user :You are now logged "
"in as user");
}
TEST_F(ZNCTest, ModperlSaslAuth) {
@@ -547,9 +547,9 @@ TEST_F(ZNCTest, ModperlSaslAuth) {
client2.Write("AUTHENTICATE FOO");
client2.ReadUntil("AUTHENTICATE " + QByteArrayLiteral("Welcome").toBase64());
client2.Write("AUTHENTICATE +");
client2.ReadUntil(
":irc.znc.in 900 nick nick!user@localhost user :You are now logged in "
"as user");
client2.ReadUntilRe(
":irc.znc.in 900 nick nick!user@(localhost)? user :You are now logged "
"in as user");
}
} // namespace