2 Commits

Author SHA1 Message Date
63def483a1 Update Sable and make LINKS test support it 2024-12-28 18:03:04 +01:00
93363e4b05 Use consistent name for services server 2024-12-28 17:55:56 +01:00
13 changed files with 31 additions and 24 deletions

View File

@ -1140,7 +1140,7 @@ jobs:
uses: actions/checkout@v4
with:
path: sable
ref: 52397dc9e0f27c3ed197f984c00f06639870716d
ref: baed3ef9ac4550dc36a45b758436769e82e8ec58
repository: Libera-Chat/sable
- name: Install rust toolchain
uses: actions-rs/toolchain@v1

View File

@ -8,7 +8,7 @@ from irctest.basecontrollers import BaseServicesController, DirectoryBasedContro
TEMPLATE_CONFIG = """
serverinfo {{
name = "services.example.org"
name = "My.Little.Services"
description = "Anope IRC Services"
numeric = "00A"
pid = "services.pid"

View File

@ -24,7 +24,7 @@ loadmodule "modules/saslserv/plain";
#loadmodule "modules/saslserv/scram";
serverinfo {{
name = "services.example.org";
name = "My.Little.Services";
desc = "Atheme IRC Services";
numeric = "00A";
netname = "testnet";

View File

@ -14,7 +14,7 @@ options {{
network_name unconfigured;
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
servtype hub;
@ -44,7 +44,7 @@ class {{
/* for services */
super {{
"services.example.org";
"My.Little.Services";
}};
@ -57,7 +57,7 @@ class {{
/* our services */
connect {{
name services.example.org;
name My.Little.Services;
host *@127.0.0.1; # unfortunately, masks aren't allowed here
apasswd password;
cpasswd password;
@ -91,7 +91,7 @@ class BahamutController(BaseServerController, DirectoryBasedController):
software_name = "Bahamut"
supported_sasl_mechanisms: Set[str] = set()
supports_sts = False
nickserv = "NickServ@services.example.org"
nickserv = "NickServ@My.Little.Services"
def create_config(self) -> None:
super().create_config()

View File

@ -44,7 +44,7 @@ channel {{
displayed_usercount = 0;
}};
connect "services.example.org" {{
connect "My.Little.Services" {{
host = "localhost"; # Used to validate incoming connection
port = 0; # We don't need servers to connect to services
send_password = "password";
@ -53,7 +53,7 @@ connect "services.example.org" {{
flags = topicburst;
}};
service {{
name = "services.example.org";
name = "My.Little.Services";
}};
privset "omnioper" {{

View File

@ -13,7 +13,7 @@ TEMPLATE_DLK_CONFIG = """\
info {{
SID "00A";
network-name "testnetwork";
services-name "services.example.org";
services-name "My.Little.Services";
admin-email "admin@example.org";
}}

View File

@ -42,7 +42,7 @@ class {{
connectfreq = 5 minutes;
}};
connect {{
name = "services.example.org";
name = "My.Little.Services";
host = "127.0.0.1"; # Used to validate incoming connection
port = 0; # We don't need servers to connect to services
send_password = "password";
@ -50,7 +50,7 @@ connect {{
class = "server";
}};
service {{
name = "services.example.org";
name = "My.Little.Services";
}};
auth {{

View File

@ -41,7 +41,7 @@ TEMPLATE_CONFIG = """
# Services:
<bind address="{services_hostname}" port="{services_port}" type="servers">
<link name="services.example.org"
<link name="My.Little.Services"
ipaddr="{services_hostname}"
port="{services_port}"
allowmask="*"
@ -51,7 +51,7 @@ TEMPLATE_CONFIG = """
<module name="spanningtree">
<module name="hidechans"> # Anope errors when missing
<sasl requiressl="no"
target="services.example.org">
target="My.Little.Services">
# Protocol:
<module name="banexception">

View File

@ -14,7 +14,7 @@ TEMPLATE_CONFIG = """
{password_field}
[Server]
Name = services.example.org
Name = My.Little.Services
MyPassword = password
PeerPassword = password
Passive = yes # don't connect to it

View File

@ -44,7 +44,7 @@ class {{
connectfreq = 5 minutes;
}};
connect {{
name = "services.example.org";
name = "My.Little.Services";
host = "127.0.0.1"; # Used to validate incoming connection
port = 0; # We don't need servers to connect to services
send_password = "password";
@ -52,7 +52,7 @@ connect {{
class = "server";
}};
service {{
name = "services.example.org";
name = "My.Little.Services";
}};
auth {{

View File

@ -64,7 +64,7 @@ listen {{
options {{ serversonly; }}
}}
link services.example.org {{
link My.Little.Services {{
incoming {{
mask *;
}}
@ -72,11 +72,11 @@ link services.example.org {{
class servers;
}}
ulines {{
services.example.org;
My.Little.Services;
}}
set {{
sasl-server services.example.org;
sasl-server My.Little.Services;
kline-address "example@example.org";
network-name "ExampleNET";
default-server "irc.example.org";

View File

@ -3,6 +3,13 @@ from irctest.numerics import ERR_UNKNOWNCOMMAND, RPL_ENDOFLINKS, RPL_LINKS
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):
@cases.mark_specifications("RFC1459", "RFC2812", "Modern")
def testLinksSingleServer(self):
@ -56,7 +63,7 @@ class LinksTestCase(cases.BaseServerTestCase):
"nick",
"My.Little.Server",
"My.Little.Server",
StrRe("0 (0042 )?test server"),
StrRe(f"0 (0042 )?{_server_info_regexp(self)}"),
],
)
@ -119,7 +126,7 @@ class ServicesLinksTestCase(cases.BaseServerTestCase):
"nick",
"My.Little.Server",
"My.Little.Server",
StrRe("0 (0042 )?test server"),
StrRe(f"0 (0042 )?{_server_info_regexp(self)}"),
],
)
self.assertMessageMatch(
@ -127,7 +134,7 @@ class ServicesLinksTestCase(cases.BaseServerTestCase):
command=RPL_LINKS,
params=[
"nick",
"services.example.org",
"My.Little.Services",
"My.Little.Server",
StrRe("1 .+"), # SID instead of description for Anope...
],

View File

@ -249,7 +249,7 @@ software:
name: Sable
repository: Libera-Chat/sable
refs:
stable: 52397dc9e0f27c3ed197f984c00f06639870716d
stable: baed3ef9ac4550dc36a45b758436769e82e8ec58
release: null
devel: master
devel_release: null