Commit Graph

560 Commits

Author SHA1 Message Date
Valentin Lorentz 7b273443ef Add tests for PRIVMSG to a server mask
https://github.com/ircdocs/modern-irc/pull/134

A bunch of tests are failing, we need to work this out in the Modern PR

Note: it needs the following patch to plexus4 to be relevant:

```diff
diff --git a/modules/core/m_message.c b/modules/core/m_message.c
index adf0821..7568f20 100644
--- a/modules/core/m_message.c
+++ b/modules/core/m_message.c
@@ -575,7 +575,7 @@ handle_special(int p_or_n, const char *command, struct Client *client_p,
       return;
     }

-    if (MyClient(source_p) && !HasUMode(source_p, UMODE_NETADMIN) && !HasFlag(source_p, FLAGS_SERVICE) && strcmp(nick + 1, me.name))
+    if (false)
     {
       sendto_one(source_p, form_str(ERR_NOPRIVILEGES), me.name, source_p->name);
       return;
```

(I'm too lazy to figure out how to become a netadmin)
2021-11-06 11:12:31 +01:00
Valentin Lorentz 59a8a3e270 Make pytest show the diff between assertion operands.
Closes GH-118.
2021-11-01 09:28:51 +01:00
Valentin Lorentz 144c3a04b4 Don't hardcode the Python version used by pre-commit 2021-11-01 09:28:14 +01:00
Val Lorentz 5e4ae7c999
Add tests for WALLOPS (#109)
* Add tests for WALLOPS

* Add perms on plexus/hybrid, skip on ergo, laxer matching for ircu2

* Fix again for irc2 and ircu2

* Servers MAY send WALLOPS only to operators.
2021-09-19 15:33:31 +02:00
Valentin Lorentz 29bfb064e9 rmeove dead code 2021-09-11 00:32:10 +02:00
Shivaram Lingamneni 33f0702c26 fix some tests not being discovered due to their class names
Follow up from #112
2021-09-10 08:46:25 +02:00
Val Lorentz f86e11a288
Use a better / more detailed reporter on Github PRs 2021-09-05 21:59:04 +02:00
Valentin Lorentz 3630a25c11 Add ngircd controller 2021-09-05 17:45:09 +02:00
Val Lorentz 50b253fda8
Fix some mode tests not being collected because of their class name (#112)
* Fix some mode tests not being collected because of their class name

* testBan: Remove unnecessary dependency on echo-message (fixes support for servers without CAP LS)
2021-09-04 21:07:17 +02:00
Val Lorentz 5e33a82af6
Split irctest/server_tests/mode.py into a subpackage
It was getting too big
2021-09-04 20:26:14 +02:00
Valentin Lorentz 8bc9c5b057 Exclude ircu2 and fill in the spec 2021-09-04 20:18:53 +02:00
Valentin Lorentz e03bb4734d Add test testEmptyRealname. 2021-09-04 20:18:53 +02:00
Valentin Lorentz cc3d70c7d3 testQuitErrors: Make it slightly less flaky with solanum? 2021-09-04 20:02:49 +02:00
Valentin Lorentz ff0d795485 Add TARGMAX test 2021-09-04 20:02:20 +02:00
Val Lorentz 23c7c1642b
exhaustive testing of Modern's WHOIS spec (#104)
* Add testWhoisNumerics, to check Modern exhaustively covers known numerics

* ircu2: Workaround for server name in testWhoisNumerics.

* testWhoisUser: Work around ircu2 restrictions on nick and username

* testWhoisNumerics: Add variant with authenticated user

* testWhoisNumerics: Add support for RPL_AWAY and RPL_WHOISSPECIAL

* testWhoisNumerics: Add variant where the WHOIS sender opers up first

* testWhoisUser: Also test with targets

* inspircd: Fix oper configuration

* Fix RPL_WHOISACTUALLY matching for Unreal.
2021-08-29 16:38:38 +02:00
Valentin Lorentz 03a401f911 Add tests for PING and PONG 2021-08-28 18:54:35 +02:00
Valentin Lorentz 15d21f4ee4 Exhaustively test AWAY. 2021-08-28 18:54:13 +02:00
Valentin Lorentz 6106fc3b98 invite & kick: update links to Modern 2021-08-26 21:15:57 +02:00
Val Lorentz 44ce324c7c
kick: Exhaustive implementation of the Modern spec + honor TARGMAX in testDoubleKickMessages (#100) 2021-08-26 21:05:23 +02:00
Val Lorentz a9e6605640
Add exhaustive testing of INVITE. (#87)
* Add exhaustive testing of INVITE.

Only tested with Modern, because no one implements the RFC syntax.

* Mark testInviteUnopped* as strict tests.

* Exclude testInviteInviteOnlyModern on Plexus4

* Add test for ERR_USERONCHANNEL.
2021-08-26 21:04:45 +02:00
Shivaram Lingamneni 125a1cc106
Merge pull request #106 from slingamn/scram_config
add advertise-scram in ergo controller
2021-08-25 18:59:30 -04:00
Shivaram Lingamneni 7e2940d820 add advertise-scram in ergo controller 2021-08-25 18:37:05 -04:00
Valentin Lorentz 7d7df34fe5 bahamut: Disable throttling
Config marks all clients as throttling-exempt, but they sometimes
reconnect to quickly for this exemption to kick in.
2021-08-13 22:53:56 +02:00
Valentin Lorentz de66606b4f Fix excessive timeout 2021-08-13 08:58:38 +02:00
Valentin Lorentz 57a08a0a57 Deselect testKeyValidation[empty] for ircu2 2021-08-11 22:46:54 +02:00
Valentin Lorentz 3cca1ce29e testKeyValidation: Add checks for long and empty keys 2021-08-11 22:46:54 +02:00
Valentin Lorentz 3fb8cbc3ff testKeyValidation: Check format of ERR_INVALIDMODEPARAM. 2021-08-11 22:46:54 +02:00
Valentin Lorentz 6641b3245f Split user_commands.py by command
For consistency with channel commands.
2021-08-11 20:46:10 +02:00
Valentin Lorentz 7a8acb44cf Split channel_operations.py by command.
It was messy.
2021-08-11 20:46:10 +02:00
Valentin Lorentz 9b02222c4c Remove 'test_' prefix for all file names.
It's redundant.
2021-08-11 19:34:33 +02:00
Valentin Lorentz fe977cf361 Try to make bahamut tests less flaky 2021-08-11 18:39:29 +02:00
Valentin Lorentz c9911da9b8 testDoubleKickMessages: Also test with a single chan 2021-08-11 18:33:05 +02:00
Valentin Lorentz 1a66d706e7 plexus4: Update to latest commit (this should fix the CI) 2021-08-11 18:23:23 +02:00
Svante Bengtson f61e3ee608 Typo, solanum refers to chary folder 2021-08-10 20:18:54 +02:00
Valentin Lorentz 370d6a3854 Add missing ircu2 to the CI 2021-08-10 18:47:54 +02:00
Val Lorentz 56906302b7
Add ircu2/snircd/irc2 controllers + fix tests to support them (#89) 2021-08-10 18:42:37 +02:00
Val Lorentz 0cf9c37950
Merge pull request #93 from ProgVal/bahamut
Add Bahamut
2021-08-10 18:29:23 +02:00
Valentin Lorentz 42e10c3848 Add an 'external_server' controller 2021-08-10 18:25:35 +02:00
Valentin Lorentz a624bf6db8 Parallelize tests for bahamut, they are very slow. 2021-08-09 23:43:30 +02:00
Valentin Lorentz 8744a49073 Make tests pass + update testKeyValidation to match the Modern PR 2021-08-09 23:43:30 +02:00
Valentin Lorentz d130ae89f2 testNickReleaseUnregistered: I don't think RFC1459 requires QUIT to be accepted this early. 2021-08-09 23:43:30 +02:00
Valentin Lorentz dfaec16c47 Some fixes for Bahamut 2021-08-09 23:43:30 +02:00
Valentin Lorentz 84d667e95e bahamut CI 2021-08-09 23:43:30 +02:00
Valentin Lorentz 42582f430a bahamut wip 2021-08-09 23:41:46 +02:00
Valentin Lorentz c37ed0f218 Unreal: Fix controller name. 2021-08-09 23:41:37 +02:00
Valentin Lorentz 299c915505 'batch' is required for 'labeled-response' to be active according to the spec 2021-08-09 23:41:37 +02:00
Val Lorentz a43ae63beb
Fix CI cache (#92)
it didn't work so far because you can't use variable in the path...
2021-08-09 20:42:36 +02:00
Shivaram Lingamneni 9de76b6063
basic server test for SCRAM-SHA-256 (#84) 2021-08-08 20:47:42 +02:00
Val Lorentz ec386a1fc9
Add Plexus4 (#90) 2021-08-08 20:46:33 +02:00
Valentin Lorentz 93a989b746 Test NAMES on invalid/nonexisting channel returns RPL_ENDOFNAMES. 2021-08-08 10:33:28 +02:00