Skip to content

Commit

Permalink
Bump Unreal to 6.0.3 and remove ELIST workarounds (#158)
Browse files Browse the repository at this point in the history
Workarounds that are only still needed for Unreal 5 and and Hybrid/Plexus
  • Loading branch information
progval committed Apr 13, 2022
1 parent 8e2670d commit 778510e
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ jobs:
uses: actions/checkout@v2
with:
path: unrealircd
ref: daa0c11f285c7123ba9fa2966dee2d1a17729f1e
ref: cedd23ae9cdd5985ce16e9869cbdb808479c3fc4
repository: unrealircd/unrealircd
- name: Build UnrealIRCd 6
run: |
Expand Down
1 change: 1 addition & 0 deletions irctest/controllers/unrealircd.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ class UnrealircdController(BaseServerController, DirectoryBasedController):
supports_sts = False

extban_mute_char = "quiet" if installed_version() >= 6 else "q"
software_version = installed_version()

def create_config(self) -> None:
super().create_config()
Expand Down
117 changes: 42 additions & 75 deletions irctest/server_tests/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ def _sleep_minutes(self, n):

@cases.mark_isupport("ELIST")
@cases.mark_specifications("Modern")
@cases.xfailIfSoftware(
["Plexus4", "Hybrid"],
"Hybrid and Plexus4 filter on ELIST=C with the opposite meaning",
)
@cases.xfailIf(
lambda self: bool(
self.controller.software_name == "UnrealIRCd"
and self.controller.software_version == 5
),
"UnrealIRCd <6.0.3 filters on ELIST=C with the opposite meaning",
)
def testListCreationTime(self):
"""
" C: Searching based on channel creation time, via the "C<val" and "C>val"
Expand Down Expand Up @@ -282,51 +293,32 @@ def testListCreationTime(self):

self._sleep_minutes(1)

if self.controller.software_name in ("UnrealIRCd", "Plexus4", "Hybrid"):
self.sendLine(2, "LIST C<2")
self.assertEqual(self._parseChanList(2), {"#chan1"})

self.sendLine(2, "LIST C>2")
self.assertEqual(self._parseChanList(2), {"#chan2"})

self.sendLine(2, "LIST C>0")
self.assertEqual(self._parseChanList(2), set())
self.sendLine(2, "LIST C>2")
self.assertEqual(self._parseChanList(2), {"#chan1"})

self.sendLine(2, "LIST C<0")
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})
self.sendLine(2, "LIST C<2")
self.assertEqual(self._parseChanList(2), {"#chan2"})

self.sendLine(2, "LIST C>10")
self.sendLine(2, "LIST C<0")
if self.controller.software_name == "InspIRCd":
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})
elif self.controller.software_name in (
"Solanum",
"Charybdis",
"InspIRCd",
"Nefarious",
):
self.sendLine(2, "LIST C>2")
self.assertEqual(self._parseChanList(2), {"#chan1"})

self.sendLine(2, "LIST C<2")
self.assertEqual(self._parseChanList(2), {"#chan2"})

self.sendLine(2, "LIST C<0")
if self.controller.software_name == "InspIRCd":
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})
else:
self.assertEqual(self._parseChanList(2), set())
else:
self.assertEqual(self._parseChanList(2), set())

self.sendLine(2, "LIST C>0")
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})
self.sendLine(2, "LIST C>0")
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})

self.sendLine(2, "LIST C<10")
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})
else:
assert False, f"{self.controller.software_name} not supported"
self.sendLine(2, "LIST C<10")
self.assertEqual(self._parseChanList(2), {"#chan1", "#chan2"})

@cases.mark_isupport("ELIST")
@cases.mark_specifications("Modern")
@cases.xfailIfSoftware(
["UnrealIRCd"], "UnrealIRCd advertises ELIST=T but does not implement it"
@cases.xfailIf(
lambda self: bool(
self.controller.software_name == "UnrealIRCd"
and self.controller.software_version == 5
),
"UnrealIRCd <6.0.3 advertises ELIST=T but does not implement it",
)
def testListTopicTime(self):
"""
Expand Down Expand Up @@ -371,46 +363,21 @@ def testListTopicTime(self):

self._sleep_minutes(1)

if self.controller.software_name in ("UnrealIRCd",):
self.sendLine(1, "LIST T<2")
self.assertEqual(self._parseChanList(1), {"#chan1"})

self.sendLine(1, "LIST T>2")
self.assertEqual(self._parseChanList(1), {"#chan2"})

self.sendLine(1, "LIST T>0")
self.assertEqual(self._parseChanList(1), set())
self.sendLine(1, "LIST T>2")
self.assertEqual(self._parseChanList(1), {"#chan1"})

self.sendLine(1, "LIST T<0")
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})
self.sendLine(1, "LIST T<2")
self.assertEqual(self._parseChanList(1), {"#chan2"})

self.sendLine(1, "LIST T>10")
self.sendLine(1, "LIST T<0")
if self.controller.software_name == "InspIRCd":
# Insp internally represents "LIST T>0" like "LIST"
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})
elif self.controller.software_name in (
"Solanum",
"Charybdis",
"InspIRCd",
"Plexus4",
"Hybrid",
"Nefarious",
):
self.sendLine(1, "LIST T>2")
self.assertEqual(self._parseChanList(1), {"#chan1"})

self.sendLine(1, "LIST T<2")
self.assertEqual(self._parseChanList(1), {"#chan2"})

self.sendLine(1, "LIST T<0")
if self.controller.software_name == "InspIRCd":
# Insp internally represents "LIST T>0" like "LIST"
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})
else:
self.assertEqual(self._parseChanList(1), set())
else:
self.assertEqual(self._parseChanList(1), set())

self.sendLine(1, "LIST T>0")
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})
self.sendLine(1, "LIST T>0")
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})

self.sendLine(1, "LIST T<10")
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})
else:
assert False, f"{self.controller.software_name} not supported"
self.sendLine(1, "LIST T<10")
self.assertEqual(self._parseChanList(1), {"#chan1", "#chan2"})
4 changes: 2 additions & 2 deletions workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ software:
name: UnrealIRCd 6
repository: unrealircd/unrealircd
refs:
stable: daa0c11f285c7123ba9fa2966dee2d1a17729f1e # 6.0.2 + a few commits
release: 29fd2e772a6b4b9107daa4e3c237df454b055810 # 6.0.2
stable: cedd23ae9cdd5985ce16e9869cbdb808479c3fc4 # 6.0.3
release: cedd23ae9cdd5985ce16e9869cbdb808479c3fc4 # 6.0.3
devel: unreal60_dev
devel_release: null
path: unrealircd
Expand Down

0 comments on commit 778510e

Please sign in to comment.