mirror of
https://github.com/progval/irctest.git
synced 2025-04-05 23:09:48 +00:00
Compare commits
7 Commits
c31aaf4d61
...
anope
Author | SHA1 | Date | |
---|---|---|---|
de17d2b2c0 | |||
06e08b52be | |||
54a1ab95ce | |||
3e6d97ae42 | |||
00c130d66c | |||
2680502dfe | |||
d090f5455e |
2
.github/workflows/test-stable.yml
vendored
2
.github/workflows/test-stable.yml
vendored
@ -1140,7 +1140,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: sable
|
path: sable
|
||||||
ref: e9701e5e8d0c4f278ddd61ce7285f4918ecf99e9
|
ref: baed3ef9ac4550dc36a45b758436769e82e8ec58
|
||||||
repository: Libera-Chat/sable
|
repository: Libera-Chat/sable
|
||||||
- name: Install rust toolchain
|
- name: Install rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
|
3
Makefile
3
Makefile
@ -84,15 +84,12 @@ LIMNORIA_SELECTORS := \
|
|||||||
$(EXTRA_SELECTORS)
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
# Tests marked with arbitrary_client_tags or react_tag can't pass because Sable does not support client tags yet
|
# Tests marked with arbitrary_client_tags or react_tag can't pass because Sable does not support client tags yet
|
||||||
# Tests marked with private_chathistory can't pass because Sable does not implement CHATHISTORY for DMs
|
|
||||||
|
|
||||||
SABLE_SELECTORS := \
|
SABLE_SELECTORS := \
|
||||||
not Ergo \
|
not Ergo \
|
||||||
and not deprecated \
|
and not deprecated \
|
||||||
and not strict \
|
and not strict \
|
||||||
and not arbitrary_client_tags \
|
and not arbitrary_client_tags \
|
||||||
and not react_tag \
|
and not react_tag \
|
||||||
and not private_chathistory \
|
|
||||||
and not list and not lusers and not time and not info \
|
and not list and not lusers and not time and not info \
|
||||||
$(EXTRA_SELECTORS)
|
$(EXTRA_SELECTORS)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ from irctest.basecontrollers import BaseServicesController, DirectoryBasedContro
|
|||||||
|
|
||||||
TEMPLATE_CONFIG = """
|
TEMPLATE_CONFIG = """
|
||||||
serverinfo {{
|
serverinfo {{
|
||||||
name = "services.example.org"
|
name = "My.Little.Services"
|
||||||
description = "Anope IRC Services"
|
description = "Anope IRC Services"
|
||||||
numeric = "00A"
|
numeric = "00A"
|
||||||
pid = "services.pid"
|
pid = "services.pid"
|
||||||
|
@ -24,7 +24,7 @@ loadmodule "modules/saslserv/plain";
|
|||||||
#loadmodule "modules/saslserv/scram";
|
#loadmodule "modules/saslserv/scram";
|
||||||
|
|
||||||
serverinfo {{
|
serverinfo {{
|
||||||
name = "services.example.org";
|
name = "My.Little.Services";
|
||||||
desc = "Atheme IRC Services";
|
desc = "Atheme IRC Services";
|
||||||
numeric = "00A";
|
numeric = "00A";
|
||||||
netname = "testnet";
|
netname = "testnet";
|
||||||
|
@ -14,7 +14,7 @@ options {{
|
|||||||
network_name unconfigured;
|
network_name unconfigured;
|
||||||
allow_split_ops; # Give ops in empty channels
|
allow_split_ops; # Give ops in empty channels
|
||||||
|
|
||||||
services_name services.example.org;
|
services_name My.Little.Services;
|
||||||
|
|
||||||
// if you need to link more than 1 server, uncomment the following line
|
// if you need to link more than 1 server, uncomment the following line
|
||||||
servtype hub;
|
servtype hub;
|
||||||
@ -44,7 +44,7 @@ class {{
|
|||||||
|
|
||||||
/* for services */
|
/* for services */
|
||||||
super {{
|
super {{
|
||||||
"services.example.org";
|
"My.Little.Services";
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class {{
|
|||||||
|
|
||||||
/* our services */
|
/* our services */
|
||||||
connect {{
|
connect {{
|
||||||
name services.example.org;
|
name My.Little.Services;
|
||||||
host *@127.0.0.1; # unfortunately, masks aren't allowed here
|
host *@127.0.0.1; # unfortunately, masks aren't allowed here
|
||||||
apasswd password;
|
apasswd password;
|
||||||
cpasswd password;
|
cpasswd password;
|
||||||
@ -91,7 +91,7 @@ class BahamutController(BaseServerController, DirectoryBasedController):
|
|||||||
software_name = "Bahamut"
|
software_name = "Bahamut"
|
||||||
supported_sasl_mechanisms: Set[str] = set()
|
supported_sasl_mechanisms: Set[str] = set()
|
||||||
supports_sts = False
|
supports_sts = False
|
||||||
nickserv = "NickServ@services.example.org"
|
nickserv = "NickServ@My.Little.Services"
|
||||||
|
|
||||||
def create_config(self) -> None:
|
def create_config(self) -> None:
|
||||||
super().create_config()
|
super().create_config()
|
||||||
|
@ -44,7 +44,7 @@ channel {{
|
|||||||
displayed_usercount = 0;
|
displayed_usercount = 0;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
connect "services.example.org" {{
|
connect "My.Little.Services" {{
|
||||||
host = "localhost"; # Used to validate incoming connection
|
host = "localhost"; # Used to validate incoming connection
|
||||||
port = 0; # We don't need servers to connect to services
|
port = 0; # We don't need servers to connect to services
|
||||||
send_password = "password";
|
send_password = "password";
|
||||||
@ -53,7 +53,7 @@ connect "services.example.org" {{
|
|||||||
flags = topicburst;
|
flags = topicburst;
|
||||||
}};
|
}};
|
||||||
service {{
|
service {{
|
||||||
name = "services.example.org";
|
name = "My.Little.Services";
|
||||||
}};
|
}};
|
||||||
|
|
||||||
privset "omnioper" {{
|
privset "omnioper" {{
|
||||||
|
@ -13,7 +13,7 @@ TEMPLATE_DLK_CONFIG = """\
|
|||||||
info {{
|
info {{
|
||||||
SID "00A";
|
SID "00A";
|
||||||
network-name "testnetwork";
|
network-name "testnetwork";
|
||||||
services-name "services.example.org";
|
services-name "My.Little.Services";
|
||||||
admin-email "admin@example.org";
|
admin-email "admin@example.org";
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class {{
|
|||||||
connectfreq = 5 minutes;
|
connectfreq = 5 minutes;
|
||||||
}};
|
}};
|
||||||
connect {{
|
connect {{
|
||||||
name = "services.example.org";
|
name = "My.Little.Services";
|
||||||
host = "127.0.0.1"; # Used to validate incoming connection
|
host = "127.0.0.1"; # Used to validate incoming connection
|
||||||
port = 0; # We don't need servers to connect to services
|
port = 0; # We don't need servers to connect to services
|
||||||
send_password = "password";
|
send_password = "password";
|
||||||
@ -50,7 +50,7 @@ connect {{
|
|||||||
class = "server";
|
class = "server";
|
||||||
}};
|
}};
|
||||||
service {{
|
service {{
|
||||||
name = "services.example.org";
|
name = "My.Little.Services";
|
||||||
}};
|
}};
|
||||||
|
|
||||||
auth {{
|
auth {{
|
||||||
|
@ -33,14 +33,15 @@ TEMPLATE_CONFIG = """
|
|||||||
class="ServerOperators"
|
class="ServerOperators"
|
||||||
>
|
>
|
||||||
|
|
||||||
<options casemapping="ascii">
|
<options casemapping="ascii"
|
||||||
|
extbanformat="any">
|
||||||
|
|
||||||
# Disable 'NOTICE #chan :*** foo invited bar into the channel-
|
# Disable 'NOTICE #chan :*** foo invited bar into the channel-
|
||||||
<security announceinvites="none">
|
<security announceinvites="none">
|
||||||
|
|
||||||
# Services:
|
# Services:
|
||||||
<bind address="{services_hostname}" port="{services_port}" type="servers">
|
<bind address="{services_hostname}" port="{services_port}" type="servers">
|
||||||
<link name="services.example.org"
|
<link name="My.Little.Services"
|
||||||
ipaddr="{services_hostname}"
|
ipaddr="{services_hostname}"
|
||||||
port="{services_port}"
|
port="{services_port}"
|
||||||
allowmask="*"
|
allowmask="*"
|
||||||
@ -50,7 +51,7 @@ TEMPLATE_CONFIG = """
|
|||||||
<module name="spanningtree">
|
<module name="spanningtree">
|
||||||
<module name="hidechans"> # Anope errors when missing
|
<module name="hidechans"> # Anope errors when missing
|
||||||
<sasl requiressl="no"
|
<sasl requiressl="no"
|
||||||
target="services.example.org">
|
target="My.Little.Services">
|
||||||
|
|
||||||
# Protocol:
|
# Protocol:
|
||||||
<module name="banexception">
|
<module name="banexception">
|
||||||
|
@ -14,7 +14,7 @@ TEMPLATE_CONFIG = """
|
|||||||
{password_field}
|
{password_field}
|
||||||
|
|
||||||
[Server]
|
[Server]
|
||||||
Name = services.example.org
|
Name = My.Little.Services
|
||||||
MyPassword = password
|
MyPassword = password
|
||||||
PeerPassword = password
|
PeerPassword = password
|
||||||
Passive = yes # don't connect to it
|
Passive = yes # don't connect to it
|
||||||
|
@ -44,7 +44,7 @@ class {{
|
|||||||
connectfreq = 5 minutes;
|
connectfreq = 5 minutes;
|
||||||
}};
|
}};
|
||||||
connect {{
|
connect {{
|
||||||
name = "services.example.org";
|
name = "My.Little.Services";
|
||||||
host = "127.0.0.1"; # Used to validate incoming connection
|
host = "127.0.0.1"; # Used to validate incoming connection
|
||||||
port = 0; # We don't need servers to connect to services
|
port = 0; # We don't need servers to connect to services
|
||||||
send_password = "password";
|
send_password = "password";
|
||||||
@ -52,7 +52,7 @@ connect {{
|
|||||||
class = "server";
|
class = "server";
|
||||||
}};
|
}};
|
||||||
service {{
|
service {{
|
||||||
name = "services.example.org";
|
name = "My.Little.Services";
|
||||||
}};
|
}};
|
||||||
|
|
||||||
auth {{
|
auth {{
|
||||||
|
@ -64,7 +64,7 @@ listen {{
|
|||||||
options {{ serversonly; }}
|
options {{ serversonly; }}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
link services.example.org {{
|
link My.Little.Services {{
|
||||||
incoming {{
|
incoming {{
|
||||||
mask *;
|
mask *;
|
||||||
}}
|
}}
|
||||||
@ -72,11 +72,11 @@ link services.example.org {{
|
|||||||
class servers;
|
class servers;
|
||||||
}}
|
}}
|
||||||
ulines {{
|
ulines {{
|
||||||
services.example.org;
|
My.Little.Services;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
set {{
|
set {{
|
||||||
sasl-server services.example.org;
|
sasl-server My.Little.Services;
|
||||||
kline-address "example@example.org";
|
kline-address "example@example.org";
|
||||||
network-name "ExampleNET";
|
network-name "ExampleNET";
|
||||||
default-server "irc.example.org";
|
default-server "irc.example.org";
|
||||||
|
@ -3,6 +3,13 @@ from irctest.numerics import ERR_UNKNOWNCOMMAND, RPL_ENDOFLINKS, RPL_LINKS
|
|||||||
from irctest.patma import ANYSTR, StrRe
|
from irctest.patma import ANYSTR, StrRe
|
||||||
|
|
||||||
|
|
||||||
|
def _server_info_regexp(case: cases.BaseServerTestCase) -> str:
|
||||||
|
if case.controller.software_name == "Sable":
|
||||||
|
return ".+"
|
||||||
|
else:
|
||||||
|
return "test server"
|
||||||
|
|
||||||
|
|
||||||
class LinksTestCase(cases.BaseServerTestCase):
|
class LinksTestCase(cases.BaseServerTestCase):
|
||||||
@cases.mark_specifications("RFC1459", "RFC2812", "Modern")
|
@cases.mark_specifications("RFC1459", "RFC2812", "Modern")
|
||||||
def testLinksSingleServer(self):
|
def testLinksSingleServer(self):
|
||||||
@ -56,7 +63,7 @@ class LinksTestCase(cases.BaseServerTestCase):
|
|||||||
"nick",
|
"nick",
|
||||||
"My.Little.Server",
|
"My.Little.Server",
|
||||||
"My.Little.Server",
|
"My.Little.Server",
|
||||||
StrRe("0 (0042 )?test server"),
|
StrRe(f"0 (0042 )?{_server_info_regexp(self)}"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -110,7 +117,7 @@ class ServicesLinksTestCase(cases.BaseServerTestCase):
|
|||||||
# This server redacts links
|
# This server redacts links
|
||||||
return
|
return
|
||||||
|
|
||||||
messages.sort(key=lambda m: m.params[-1])
|
messages.sort(key=lambda m: tuple(m.params))
|
||||||
|
|
||||||
self.assertMessageMatch(
|
self.assertMessageMatch(
|
||||||
messages.pop(0),
|
messages.pop(0),
|
||||||
@ -119,7 +126,7 @@ class ServicesLinksTestCase(cases.BaseServerTestCase):
|
|||||||
"nick",
|
"nick",
|
||||||
"My.Little.Server",
|
"My.Little.Server",
|
||||||
"My.Little.Server",
|
"My.Little.Server",
|
||||||
StrRe("0 (0042 )?test server"),
|
StrRe(f"0 (0042 )?{_server_info_regexp(self)}"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
self.assertMessageMatch(
|
self.assertMessageMatch(
|
||||||
@ -127,9 +134,9 @@ class ServicesLinksTestCase(cases.BaseServerTestCase):
|
|||||||
command=RPL_LINKS,
|
command=RPL_LINKS,
|
||||||
params=[
|
params=[
|
||||||
"nick",
|
"nick",
|
||||||
"services.example.org",
|
"My.Little.Services",
|
||||||
"My.Little.Server",
|
"My.Little.Server",
|
||||||
StrRe("1 .+"), # SID instead of description for Anope...
|
StrRe("[01] .+"), # SID instead of description for Anope...
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class SaslTestCase(cases.BaseServerTestCase):
|
|||||||
@cases.mark_specifications("IRCv3")
|
@cases.mark_specifications("IRCv3")
|
||||||
@cases.skipUnlessHasMechanism("PLAIN")
|
@cases.skipUnlessHasMechanism("PLAIN")
|
||||||
def testPlainNonAscii(self):
|
def testPlainNonAscii(self):
|
||||||
password = "é" * 100
|
password = "é" * 30
|
||||||
authstring = base64.b64encode(
|
authstring = base64.b64encode(
|
||||||
b"\x00".join([b"foo", b"foo", password.encode()])
|
b"\x00".join([b"foo", b"foo", password.encode()])
|
||||||
).decode()
|
).decode()
|
||||||
|
@ -221,7 +221,6 @@ class WhoisTestCase(_WhoisTestMixin, cases.BaseServerTestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@cases.mark_specifications("RFC2812")
|
@cases.mark_specifications("RFC2812")
|
||||||
@cases.xfailIfSoftware(["Sable"], "https://github.com/Libera-Chat/sable/issues/101")
|
|
||||||
def testWhoisMissingUser(self):
|
def testWhoisMissingUser(self):
|
||||||
"""Test WHOIS on a nonexistent nickname."""
|
"""Test WHOIS on a nonexistent nickname."""
|
||||||
self.connectClient("qux", name="qux")
|
self.connectClient("qux", name="qux")
|
||||||
|
@ -249,7 +249,7 @@ software:
|
|||||||
name: Sable
|
name: Sable
|
||||||
repository: Libera-Chat/sable
|
repository: Libera-Chat/sable
|
||||||
refs:
|
refs:
|
||||||
stable: e9701e5e8d0c4f278ddd61ce7285f4918ecf99e9
|
stable: baed3ef9ac4550dc36a45b758436769e82e8ec58
|
||||||
release: null
|
release: null
|
||||||
devel: master
|
devel: master
|
||||||
devel_release: null
|
devel_release: null
|
||||||
|
Reference in New Issue
Block a user