mirror of
https://github.com/progval/irctest.git
synced 2025-04-07 15:59:49 +00:00
Unreal: Add support for Atheme
This commit is contained in:
@ -252,7 +252,10 @@ class BaseServicesController(_BaseController):
|
||||
c.connect(self.server_controller.hostname, self.server_controller.port)
|
||||
c.sendLine("NICK chkNS")
|
||||
c.sendLine("USER chk chk chk chk")
|
||||
c.getMessages(synchronize=False)
|
||||
for msg in c.getMessages(synchronize=False):
|
||||
if msg.command == "PING":
|
||||
# Hi Unreal
|
||||
c.sendLine("PONG :" + msg.params[0])
|
||||
c.getMessages()
|
||||
|
||||
timeout = time.time() + 5
|
||||
|
@ -58,7 +58,7 @@ class AthemeServices(BaseServicesController, DirectoryBasedController):
|
||||
def run(self, protocol: str, server_hostname: str, server_port: int) -> None:
|
||||
self.create_config()
|
||||
|
||||
assert protocol in ("inspircd", "charybdis")
|
||||
assert protocol in ("inspircd", "charybdis", "unreal4")
|
||||
|
||||
with self.open_file("services.conf") as fd:
|
||||
fd.write(
|
||||
|
@ -7,6 +7,7 @@ from irctest.basecontrollers import (
|
||||
DirectoryBasedController,
|
||||
NotImplementedByController,
|
||||
)
|
||||
from irctest.controllers.atheme_services import AthemeServices
|
||||
from irctest.irc_utils.junkdrawer import find_hostname_and_port
|
||||
|
||||
TEMPLATE_CONFIG = """
|
||||
@ -63,7 +64,7 @@ listen {{
|
||||
|
||||
link services.example.org {{
|
||||
incoming {{
|
||||
mask localhost;
|
||||
mask *;
|
||||
}}
|
||||
password "password";
|
||||
class servers;
|
||||
@ -73,6 +74,7 @@ ulines {{
|
||||
}}
|
||||
|
||||
set {{
|
||||
sasl-server services.example.org;
|
||||
kline-address "example@example.org";
|
||||
network-name "ExampleNET";
|
||||
default-server "irc.example.org";
|
||||
@ -175,7 +177,13 @@ class UnrealircdController(BaseServerController, DirectoryBasedController):
|
||||
)
|
||||
|
||||
if run_services:
|
||||
raise NotImplementedByController("Registration services")
|
||||
self.wait_for_port()
|
||||
self.services_controller = AthemeServices(self.test_config, self)
|
||||
self.services_controller.run(
|
||||
protocol="unreal4",
|
||||
server_hostname=services_hostname,
|
||||
server_port=services_port,
|
||||
)
|
||||
|
||||
|
||||
def get_irctest_controller_class() -> Type[UnrealircdController]:
|
||||
|
Reference in New Issue
Block a user