Skip to content

Commit

Permalink
Add regression test for Insp's labeled nick bug (#242)
Browse files Browse the repository at this point in the history
* Add regression test for Insp's labeled nick bug

* Exclude test from irc2 and ircu2 as they error on CAP REQ
  • Loading branch information
progval authored Jan 4, 2024
1 parent 246a259 commit d9ad638
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions irctest/controllers/inspircd.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def installed_version() -> int:

class InspircdController(BaseServerController, DirectoryBasedController):
software_name = "InspIRCd"
software_version = installed_version()
supported_sasl_mechanisms = {"PLAIN"}
supports_sts = False
extban_mute_char = "m"
Expand Down
24 changes: 24 additions & 0 deletions irctest/server_tests/regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,27 @@ def testNickReleaseUnregistered(self):
self.sendLine(2, "USER u s e r")
reply = self.getRegistrationMessage(2)
self.assertMessageMatch(reply, command=RPL_WELCOME)

@cases.mark_specifications("IRCv3")
def testLabeledNick(self):
"""
InspIRCd up to 3.16.1 used the new nick as source of NICK changes
https://github.com/inspircd/inspircd/issues/2067
https://github.com/inspircd/inspircd/commit/83f01b36a11734fd91a4e7aad99c15463858fe4a
"""
self.connectClient(
"alice",
capabilities=["batch", "labeled-response"],
skip_if_cap_nak=True,
)

self.sendLine(1, "@label=abc NICK alice2")
self.assertMessageMatch(
self.getMessage(1),
nick="alice",
command="NICK",
params=["alice2"],
tags={"label": "abc", **ANYDICT},
)

0 comments on commit d9ad638

Please sign in to comment.