Commit Graph

627 Commits

Author SHA1 Message Date
Val Lorentz da005d7d24
Add tests for WHOX. (#131) 2022-02-21 21:43:22 +01:00
Valentin Lorentz 79c65cf248 Generalize ANYSTR to ListRemainder
So it can match specific strings and have a minimum length.
This can be used to match ISUPPORT-like messages.
2022-02-19 11:55:03 +01:00
Valentin Lorentz d34175d6a8 Fix message matching on empty prefix/params/tags/... 2022-02-19 11:54:44 +01:00
Val Lorentz 1371979ccd
lusers: Add a variant that ircu2 and snircd can pass + add stricter tests (#126) 2022-01-15 00:19:58 +01:00
Val Lorentz 88a8f8ad8d
Add tests for INFO (#121)
* Add tests for INFO

* Workaround remote INFO being oper-only on some ircds

* Skip testInfoNosuchserver on Ergo

* info: Mark tests with target as deprecated.
2022-01-10 23:55:42 +01:00
Val Lorentz 255ef1e469
Add tests for the HELP and HELPOP commands (#117)
* Add tests for the HELP and HELPOP commands

* Make testHelpUnknownSubject accept lowercase

* Add support for Hybrid and Plexus4's normalization
2022-01-10 23:55:24 +01:00
Shivaram Lingamneni cac4428cbd
regression test for ergochat/ergo#1898 (#130) 2022-01-10 23:22:46 +01:00
Shivaram Lingamneni 8240cd95cf
regression test for ergochat/ergo#1876 (#125) 2022-01-10 21:35:17 +01:00
Val Lorentz 6c393c4e00
Add tests for WHO (#122)
* Add tests for WHO

* Make the mask in RPL_ENDOFWHO case-insensitive + skip test when there is a space in the mask

* Remove 'o' flag of WHO, it's not consistently implemented

* Skip matches on username and realname (for now?)

* Add workarounds from irc2 and ircu2.

* Add test for 'WHO *'.

* Exclude mask tests in test_who.py for Bahamut
2021-12-23 17:15:10 +01:00
Val Lorentz 05e78802ca
Add support for Unreal 6 (#123)
List of issues we had:
 
* echo wallops missing `!user@host` [wallops: Send a full NUH as prefix in echoed WALLOPS unrealircd/unrealircd#186](https://github.com/unrealircd/unrealircd/pull/186)
* RPL_MONONLINE is (re)sent on nick case change - https://bugs.unrealircd.org/view.php?id=6013
* MONITOR accepts masks - https://bugs.unrealircd.org/view.php?id=6014
* KICK doesn't support multiple channels anymore, despite unchanged TARGMAX - https://bugs.unrealircd.org/view.php?id=6015
2021-12-19 00:45:51 +01:00
Valentin Lorentz 16533de157 Fix invalid nick 2021-12-10 17:14:26 +01:00
Shivaram Lingamneni d29c0035e6 test that ERR_UNKNOWNCOMMAND is labeled
If an invalid command is sent with a valid label, it should receive
ERR_UNKNOWNCOMMAND with a label (comparable to other error responses).
2021-12-03 10:15:32 +01:00
Valentin Lorentz 18befc9e96 inspircd: Increase limit of connections on insp4
There used to be no limit by default, but 460220fbf5 set it to 3.
2021-11-25 20:32:14 +01:00
Val Lorentz 2684e7edb7
Enable services tests for hybrid and plexus on the CI (#120)
* Enable services tests for hybrid and plexus on the CI

* Workaround the broken Github CI's host config
2021-11-20 12:15:07 +01:00
Valentin Lorentz b895539bdd Update links to WHOIS spec. 2021-11-12 22:34:58 +01:00
Valentin Lorentz 39587c3c49 Add testBanList 2021-11-06 09:49:12 +01:00
Valentin Lorentz 3b96b5992c sts: Don't send the port on secure connections 2021-11-06 09:48:05 +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
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 7e2940d820 add advertise-scram in ergo controller 2021-08-25 18:37:05 -04: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
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 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 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
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
Shivaram Lingamneni 2343930419
Merge pull request #86 from slingamn/hostname_lookup
disable hostname lookup in ergo controller
2021-08-03 17:43:37 -04:00
Shivaram Lingamneni 3289c64199 disable hostname lookup in ergo controller 2021-08-03 16:49:35 -04:00
Shivaram Lingamneni f63de0548a reenable some account-registration tests for Ergo
These were incorrectly being skipped. If `CAP LS 302` precedes
`requestCapabilities`, `requestCapabilities` sees the LS response
instead of the ACK it expects. Then it assumes that the request was
NAK'ed and skips the test.
2021-07-30 19:10:48 +02:00
Valentin Lorentz 59c7252da1 testUnsetTopicResponses: Assert reply to clearing topic is a TOPIC command. 2021-07-11 17:23:00 +02:00
Valentin Lorentz 4fb7ebcd2c testUnsetTopicResponses: Also check the TOPIC command is forwarded when unsetting the topic 2021-07-11 17:13:31 +02:00
Val Lorentz 77272f83fb
Fix Hybrid support + enable it on CI (#82)
* Fix Hybrid support + enable it on CI

* Can't make Hybrid linking work on Github CI

because the reverse DNS is 'cpu-pool.com' for some reason, and I don't
want to hardcode it, so I give up.
2021-07-10 16:33:32 +02:00
Val Lorentz 8ddf39bd91
Deduplicate Insp/Unreal/Anope builds (#77) 2021-07-07 21:05:14 +02:00
Shivaram Lingamneni 9b18d68707
Merge pull request #76 from ergochat/master
update draft/register -> draft/account-registration
2021-07-07 13:58:40 -04:00
Val Lorentz a637ae3927
Add Anope controller, and use it with inspircd and unreal (#75)
* Add Anope controller, and use it with inspircd and unreal

* Build Anope before running it, duh

* Fix Anope build script

* Consistently use ascii casemapping instead of rfc1459

* Skip failing test with Anope
2021-07-07 15:06:00 +02:00
Shivaram Lingamneni a29b7c5631 update draft/register -> draft/account-registration 2021-07-07 09:04:22 -04:00
Valentin Lorentz 7e024b9ead Add CLI option --services-controller to allow alternatives to Atheme (none for now)
+ fix some issues with killing services processes
2021-07-07 14:02:47 +02:00
Valentin Lorentz 54a911c2f5 Revert "Kill controlled processes immediately"
This reverts commit e8dde0e989.

Actually, this breaks Limnoria's STS tests, I need to investigate this
later.
2021-07-07 12:44:10 +02:00
Valentin Lorentz e8dde0e989 Kill controlled processes immediately
Also ensures services are always stopped (so far, they were not if
they ignored SIGTERM but the ircd honors SIGTERM)
2021-07-07 12:13:40 +02:00
Valentin Lorentz 08a74096d0 test_cap: Fix random failure. 2021-07-04 22:44:18 +02:00
Valentin Lorentz 450a413036 Fix random failure (again) 2021-07-04 20:11:35 +02:00
Valentin Lorentz 15f9875ae5 chathistory: Parametrize tests by subcommand
This means that:

* if one subcommand implementation is buggy, other subcommands are still tested and
  have a chance to pass
* we can exclude known-buggy subcommands from the Makefile
* when a test failure happens, we get much shorter logs (only logs for
  that subcommand's I/O)
2021-07-04 17:31:18 +02:00
Valentin Lorentz 92a73ad4a5 Use pytest parametrization instead of ad-hoc method generation 2021-07-04 17:06:37 +02:00
Valentin Lorentz 0177c369dd Switch from unittest-style to pytest-style test collection
I was to use parametrization in a future test, but pytest doesn't
support it on unittest-style tests.
2021-07-04 17:06:37 +02:00
Val Lorentz 06f053bf61
Remove some Ergo marks (#70)
* Remove some 'Ergo' marks

These are not ergo-specific specs

* Make chathistory test less Ergo-specific

Although they can only run on Ergo for now, as Unreal has a couple
of minor bugs that prevents them from passing.

* Fix synchronization issue

(NickServ sets MODE +r, which is unexpected caught by the next
self.assertMessageMatch call)
2021-07-04 15:04:48 +02:00
Valentin Lorentz 61974e6d0c Enable mute extban tests on Ergo 2021-07-04 09:55:46 +02:00
Shivaram Lingamneni 4932d410e2 fix chathistory spec violation in INVALID_TARGET
https://github.com/ergochat/ergo/issues/1731
2021-07-04 09:51:04 +02:00
Valentin Lorentz fc07fa7d96 Don't check for NickServ availability multiple times per test
It's a waste of time.
2021-07-03 11:48:25 +02:00
Valentin Lorentz 63f4130ab5 Unreal: Add support for Atheme 2021-07-03 11:15:34 +02:00
Valentin Lorentz 4271d5d986 test_bot_mode: Fix racey failures
cause by the sent message being processed after the target
user's recv
2021-07-03 09:59:31 +02:00
Val Lorentz d74b0e74c6
Merge pull request #62 from ProgVal/unreal
Add Unreal controller
2021-07-03 09:54:22 +02:00
Valentin Lorentz 83152bdc24 unreal: deselect tests depending on +draft/react
Unreal won't support them 1st-party:
https://github.com/unrealircd/unrealircd/pull/149
2021-07-03 09:40:49 +02:00
Valentin Lorentz c4d19d44e8 test_labeled_responses: Actually check 'label' tags aren't relayed
The existing assertion's comment said it checked the label wasn't
relayed, but the code actually let any tag through.
2021-07-03 09:31:51 +02:00
Valentin Lorentz 3fafc76baa fix comment 2021-07-02 22:25:45 +02:00
Valentin Lorentz 42225a68b7 test_buffering: improve log readability 2021-07-02 22:25:07 +02:00
Valentin Lorentz a1040a4553 Minor bug fixes 2021-07-02 21:48:12 +02:00
Valentin Lorentz f83f2a4edf Make all tests pass with Unreal (minus service tests) 2021-07-02 21:41:35 +02:00
Valentin Lorentz 2d2e788275 Start adding support for Unreal
Not all tests pass yet, Unreal uses the protocol in ways we did not anticipate.
2021-07-01 23:10:37 +02:00
Valentin Lorentz 2972706ca6 Add a 'services' mark, to allow disabling tests that depend on them. 2021-07-01 17:17:59 +02:00
Valentin Lorentz 26a0245a6a Add tests for the draft bot mode. 2021-07-01 16:44:48 +02:00
Shivaram Lingamneni cccb937068
Merge pull request #59 from ergochat/master
merge in a new ergo regression test
2021-06-28 01:48:18 -04:00
Shivaram Lingamneni 50cd718871 explicitly request sasl cap in new test 2021-06-28 00:23:26 -04:00
Shivaram Lingamneni 342ffcbdbe enable run_services for new test 2021-06-28 00:18:39 -04:00
Valentin Lorentz 3d2399f62e Run Atheme with Charybdis, to enable tests depending on SASL 2021-06-27 21:19:34 +02:00
Valentin Lorentz 76db5758e9 Remove ircd-seven
A future commit will need Chary and its subclasses to use SASL,
but ircd-seven has a different config to use SASL.

And ircd-seven is not used anymore AFAICT, and won't be getting any updates,
so I don't want to bother.
2021-06-27 21:19:34 +02:00
Valentin Lorentz c5037e8ec9 Make AthemeController a collaborator instead of a mixin
It makes the inheritence less messy and avoids a mypy hack.

This will also allow configuring which service package an ircd controller
uses, instead of hardcoding it in the inheritence DAG.
2021-06-27 16:45:43 +02:00
Valentin Lorentz 7ee3c562d1 Run Atheme with InspIRCd, to enable tests depending on SASL 2021-06-27 16:45:43 +02:00
Valentin Lorentz 48eeeb7312 Always request the 'sasl' cap before using AUTHENTICATE
InspIRCd ignores AUTHENTICATE when the cap is not negotiated.
2021-06-27 14:38:54 +02:00
Valentin Lorentz 7ac4d7f80f Use `getRegistrationMessage()` when relevant
It's an alias for
`filter_pred=lambda m: m.command != "NOTICE", synchronize=False`
2021-06-27 14:38:54 +02:00
Valentin Lorentz b3d775f0d6 getMessages: Raise an error when forgetting to synchronize=False
Instead of hanging forever.

Hopefully there shouldn't be any false positive.
2021-06-27 14:38:54 +02:00
Valentin Lorentz cc8b9748a7 Always request the 'sasl' cap before using AUTHENTICATE
It's required by InspIRCd.

This commit also adds a check so we don't forget it when testing
locally only with Ergo.
2021-06-27 14:38:54 +02:00
Valentin Lorentz 829edddeb8 Remove some Ergo-specific assumptions.
We need to remove them before we can start running these tests
on Inspircd.
2021-06-27 14:38:54 +02:00
Shivaram Lingamneni 65b479c609 add regression test for ergochat/ergo#1696 2021-06-27 04:41:30 -04:00
Valentin Lorentz 6458586179 Make find_hostname_and_port its own function
So it can be used to generate multiple ports, which will be needed
to link services.
2021-06-27 00:27:48 +02:00
Valentin Lorentz eef07da56a cases: Stop ignoring the 'msg' parameter in assert* methods 2021-06-27 00:23:21 +02:00
Valentin Lorentz 60e6c013b2 Fix mypy error 2021-06-26 22:11:47 +02:00
Valentin Lorentz a29e46c17a Add test for account tag on INVITE messages.
This will catch issues like https://github.com/solanum-ircd/solanum/issues/166
(when we have registration support for solanum)
2021-06-26 18:44:55 +02:00
Valentin Lorentz 6f68a0d601 Hide irrelevant frames on pytest failures
It makes failures easier to read, by showing only the relevant tests
instead of the helper functions.

https://doc.pytest.org/en/latest/example/simple.html#writing-well-integrated-assertion-helpers
2021-06-26 18:37:44 +02:00
Shivaram Lingamneni 50b36f281d ergo: remove additional-nick-limit 2021-06-18 18:43:45 -04:00
Shivaram Lingamneni 7be29ad801 rename Oragono to Ergo 2021-05-27 00:07:32 -04:00
Shivaram Lingamneni 6bdfdf58b2 first pass at renaming oragono to ergo 2021-05-26 16:02:22 -04:00
Shivaram Lingamneni db0c64fa30 remove draft/resume-0.5 tests 2021-05-19 08:49:49 +02:00
Shivaram Lingamneni 729b7cb8d8 regression test for oragono/oragono#1642 2021-05-05 22:08:22 +02:00
Valentin Lorentz cfe0b0d3dd Add test for message matching commands
+ fix a bug in tested code
+ change conftest.py to allow missing --controller arg (which is
  an UI improvement, as it allows using 'pytest --help' now)
2021-04-18 09:21:27 +02:00
Shivaram Lingamneni 498b67ae96 Remove CHATHISTORY * and znc.in/playback *self
CHATHISTORY * is being removed here:

https://github.com/ircv3/ircv3-specifications/pull/450

znc.in/playback *self was an Oragono extension that didn't catch on:

https://github.com/oragono/oragono/issues/1205
2021-04-17 23:26:06 +02:00
Valentin Lorentz 5e622a34d3 test_buffering: add support for ERR_INPUTTOOLONG 2021-03-05 20:29:44 +01:00
Valentin Lorentz 4d2976c7e6 Use TCP_NODELAY on the socket, it may be better to make test_buffering relevant 2021-03-05 20:21:48 +01:00
Valentin Lorentz c58c238875 Add a set of buffering/truncation test cases.
Also checks for UTF8ONLY
2021-03-05 19:30:30 +01:00
Shivaram Lingamneni 100b53fb18 test for Oragono disallowing truncation 2021-03-05 19:30:15 +01:00
Valentin Lorentz 6d74a06327 always negotiate batch with labeled-response, it's required by the spec 2021-03-04 17:38:50 +01:00
Shivaram Lingamneni 0f2445c1eb review fixes 2021-03-03 14:37:03 -05:00
Shivaram Lingamneni 74f40ad23d allow ERR_INPUTTOOLONG if a PRIVMSG cannot be relayed 2021-03-03 13:57:11 -05:00
Valentin Lorentz 1e0de7aefb assertMessageMatch: Add pattern-matching on tags, and start using it. 2021-03-01 21:59:50 +01:00
Valentin Lorentz 3c2db1531a register: Update error name to COMPLETE_CONNECTION_REQUIRED to follow the spec 2021-02-28 23:34:23 +01:00
Valentin Lorentz 3f231403ba Use assertMessageMatch whenever possible, and generalize listMatch to accept regexps
it's stricter this way + hopefully more readable and better error msgs
2021-02-28 23:22:31 +01:00
Valentin Lorentz e012c5248b Move list_match to its own module, and prepare generalizing AnyStr 2021-02-28 23:22:31 +01:00
Valentin Lorentz b8867cf4a2 Use a new 'magic' class AnyStr instead of Ellipsis for pattern-matching messages. 2021-02-28 20:44:31 +01:00
Valentin Lorentz 1fbd51c0b5 Rename assertMessageEqual to assertMessageMatch
it describes the function better
2021-02-28 20:44:31 +01:00
Valentin Lorentz 62a87b5957 type-annotate all functions outside the tests themselves. 2021-02-28 18:45:13 +01:00
Valentin Lorentz ac2a37362c Use dataclasses instead of dicts/namedtuples 2021-02-28 18:45:13 +01:00
Valentin Lorentz 12da7e1e3b Enable mypy, and do the minimal changes to make it pass 2021-02-28 18:45:13 +01:00
Valentin Lorentz 1c1b8214a0 normalize_namreply_params: Fix typo in function call 2021-02-28 18:45:13 +01:00
Valentin Lorentz 04ae1dcba1 echo_message: run black 2021-02-28 11:59:25 +01:00
Valentin Lorentz 00ff27f277 resume: rename bar/baz to observer/mainnick to improve readability 2021-02-28 11:31:56 +01:00
Valentin Lorentz 6125381598 fix typo in spec name 2021-02-28 10:00:24 +01:00
Valentin Lorentz daa182bcd2 Make testDirectMessageEcho not Oragono-specific 2021-02-28 09:57:37 +01:00
Valentin Lorentz f7be6cf016 Make all remaining tests not Oragono-specific when relevant. 2021-02-28 09:57:16 +01:00
Valentin Lorentz 6b6b86415d Make testKeyValidation not Oragono-specific. 2021-02-28 09:43:08 +01:00
Valentin Lorentz 28ecfc4608 testStatusmsgFromOp: Fix interleaved events causing the test to be flaky. 2021-02-28 09:41:44 +01:00
Valentin Lorentz 96a8d1f7ff Make MuteExtban not Oragono-specific. 2021-02-28 09:24:47 +01:00
Valentin Lorentz 8cefc57e61 cases: Get rid of the subcommand/subparams nonsense
Tt was specific to the CAP command but pretended to be generic.

Instead, allow matching on the params argument using Ellipsis.
2021-02-28 08:59:48 +01:00
Valentin Lorentz 70fcc15e00 statusmsg: Make tests non Oragono-specific. 2021-02-28 08:57:39 +01:00
Valentin Lorentz da9567b612 Add BanMode tests. 2021-02-28 08:56:20 +01:00
Valentin Lorentz 51d0ce4483 Remove getIsupport(), it's redundant with server_support 2021-02-27 16:00:28 +01:00
Valentin Lorentz 22eb8d4369 inspircd: Enable all modules for caps/commands that we can test
Instead of skipping these tests.
2021-02-27 15:34:59 +01:00
Valentin Lorentz 06972fc1c4 Add Solanum 2021-02-27 15:34:59 +01:00
Valentin Lorentz 72eee6114f Add ircd-seven 2021-02-27 15:23:33 +01:00
Valentin Lorentz 407fe663d1 Add Solanum 2021-02-27 15:23:33 +01:00
Valentin Lorentz 4d50c3eabc Rewrite PART tests to actually follow the RFCs. 2021-02-27 14:27:22 +01:00
Valentin Lorentz 309a0e45e7 assertMessageEqual: fix error msg 2021-02-27 14:14:08 +01:00
Valentin Lorentz 0352a83a73 Change IRCv3 marks to reference capabilities instead of v3.1 / v3.2 2021-02-27 12:59:28 +01:00
Valentin Lorentz 5ab2fa709e Fix testNickReleaseUnregistered on inspircd
PING is not valid before registration.
2021-02-27 10:33:57 +01:00
Valentin Lorentz de243b38eb Fix testCapRemovalByClient for Charybdis 2021-02-26 21:26:25 +01:00
Valentin Lorentz ae09b99d0e Overload the < <= > >= comparison assertion methods. 2021-02-26 21:06:17 +01:00
Valentin Lorentz 0a1ccfec24 Fix assertMessageEqual to actually raise the exception 2021-02-26 21:05:01 +01:00
Valentin Lorentz e6ca463dce Make testCapRemovalByClient not specific to Oragono 2021-02-26 19:16:24 +01:00
Valentin Lorentz ff67739c67 Add _IrcTestCase.messageDiffers to allow matching messages without using assertions. 2021-02-26 19:16:24 +01:00
Valentin Lorentz 05e75782c9 testNoticeNonexistentChannel: also quote RFC 1459 2021-02-24 19:46:36 +01:00
Valentin Lorentz c90141bc61 Use a dedicated 'deprecated' mark instead of add '-deprecated' for each spec
Also rename `@cases.SpecificationSelector.requiredBySpecification("xxx")`
to `@cases.mark_specifications("xxx")` because it's shorter and looks
like pytest's own syntax
2021-02-24 19:19:35 +01:00
Valentin Lorentz 2a1324fc94 lusers: Fix tests to allow missing optional args
According to https://defs.ircdocs.horse/defs/numerics.html , they are not mandatory;
and InspIRCd doesn't return them.
2021-02-24 19:07:22 +01:00
Valentin Lorentz f92b0e2889 lusers: Assert GlobalInvisible and GlobalVisible are lower or equal to the total 2021-02-24 19:07:22 +01:00
Valentin Lorentz fb04da39cc lusers: deduplicate assertions 2021-02-24 19:07:22 +01:00
Valentin Lorentz 0cf2726f78 away_notify: Better errors 2021-02-24 18:59:45 +01:00
Valentin Lorentz 79399e5c99 account_tag: Fix/proofread assertions. 2021-02-24 18:55:30 +01:00
Valentin Lorentz 2bd5093df9 Remove strip_first_param argument, it's unused. 2021-02-24 18:19:29 +01:00
Valentin Lorentz 8ea7197f76 Crash when a controlled process stopped instead of waiting forever. 2021-02-24 16:18:08 +01:00
Valentin Lorentz 932e9ade5a sopel: Create ~/.sopel/ if it does not exist 2021-02-24 13:49:14 +01:00
Shivaram Lingamneni 2ef4689004 restore print statement when waiting 2021-02-22 21:55:15 +01:00
Shivaram Lingamneni efab101890 remove sleep from read loops
recv() should block as necessary up to the 1-second timeout;
connection failures will break out of the loop with an exception.
There shouldn't be a case where we incur a busy wait.
2021-02-22 21:55:15 +01:00
Shivaram Lingamneni 10edb9dd9d fix LUSERS tests to work with oragono 2021-02-22 20:21:39 +01:00
Valentin Lorentz 4ac891382e make pyxmpp2-scram an optional dependency. 2021-02-22 19:44:41 +01:00
Valentin Lorentz ca93caa69d Make the dependency on ecdsa optional 2021-02-22 19:44:41 +01:00
Valentin Lorentz f9d0ec18ff Make flake8 pass, and run it automatically. 2021-02-22 19:42:18 +01:00
Valentin Lorentz 836cc5d6d2 Use isort to order imports. 2021-02-22 19:42:18 +01:00
Valentin Lorentz 8016e01daf Use Black code style 2021-02-22 19:42:18 +01:00
Valentin Lorentz 34ed62fd85 Merge branch 'cherry-picking' ('Cherry pick commits from my old branch of irctest' GH-17) 2021-02-22 18:44:41 +01:00
Valentin Lorentz e9a2bdd008 Fix merges 2021-02-22 18:33:42 +01:00
Valentin Lorentz f0141b0a93 Fix compatibility with return value of SSLSocket.sendall in python >= 3.6.
https://bugs.python.org/issue25951
2021-02-21 23:18:55 +01:00
Valentin Lorentz e45a1fb9db limnoria: add support for STS. 2021-02-21 23:18:55 +01:00
Valentin Lorentz 28f1ceb4e6 Fix ecdsa tests to use the same protocol as Atheme.
Which requires not hashing the challenge.
2021-02-21 23:18:55 +01:00
Valentin Lorentz ff54d9cfd6 Temporarily disabling sts on Limnoria until it's released. 2021-02-21 22:05:15 +01:00
Valentin Lorentz b4873fdea4 Ignore return value of sendall; it's not None on py < 3.6.
https://bugs.python.org/issue25951
2021-02-21 22:05:15 +01:00
Valentin Lorentz 373c705247 Add STS tests. 2021-02-21 22:05:15 +01:00
Valentin Lorentz 68c2dad8d9 For SCRAM, check clients send an empty response at the end.
https://github.com/ircv3/ircv3-specifications/pull/326
2021-02-21 22:05:15 +01:00
Valentin Lorentz 4ded96fbba Fix LUSER tests to pass with Charybdis. 2021-02-21 21:50:24 +01:00
Valentin Lorentz 85f02c4626 Use pytest as a test runner instead of unit test
'./test <controller> -s spec1 -s spec2' becomes:
'pytest --controller <controller> -k "spec1 or spec2"'

This uses pytest's test selection, which allows finer selection of which tests
to run (for example, it will allow running all tests but those requiring one
feature or combination of features).
It also allows running only a particular test (or set of test) by
filtering on their name or file name.

pytest also shows a much nicer output while testing (grouped by file,
percentage of tests run, manages the verbosity); and it captures all the output
and only shows it if the test fails, which makes --show-io irrelevant.
2021-02-21 18:03:20 +01:00
Valentin Lorentz efa5b5eb3b client_tests/test_sasl: Update to work with newer versions of Sopel 2021-02-20 10:53:23 +01:00
Valentin Lorentz fe694487c7 Better handling of connections closed by clients. 2021-02-20 10:43:00 +01:00
Valentin Lorentz c4a9592156 Fix Sopel tests; broken by 9b2a6a063c. 2021-02-20 10:42:37 +01:00
Valentin Lorentz 3d7a539d06 Fix some tests to pass with inspircd 2021-02-20 09:53:30 +01:00
Valentin Lorentz 3932a40d74 Fix client tests broken by a14ebf9ec2. 2021-02-19 23:00:00 +01:00
Valentin Lorentz 0dfe0de549 Fix client tests broken by 020564bdcb. 2021-02-19 22:57:59 +01:00
Valentin Lorentz c9c08c7f6f client_mock: Write client name in 'waiting...' message 2021-02-19 22:25:41 +01:00
Valentin Lorentz 684c889304 Fix testWhoisUser to pass with inspircd. 2021-02-19 19:22:00 +01:00
Valentin Lorentz c9dbba985c Fix crash when sendLine() is called with bytes and --show-io is given. 2021-02-19 19:19:58 +01:00
Valentin Lorentz fe0d65f7c8 Fix oragono tests broken by 9b2a6a063c. 2021-02-19 19:19:37 +01:00
Shivaram Lingamneni 8d427c80c8 fix stall on failed channel join 2021-02-18 19:35:11 +01:00
Valentin Lorentz a74f893942 Fix IRCv3 tests to not fail with Charybdis. 2021-02-17 21:35:36 +01:00
Valentin Lorentz 75dafa47fe testWhoisUser: use a shorter username, so it doesn't get truncated
eg. charybdis limits it to 10 characters
2021-02-17 10:45:52 +01:00
Valentin Lorentz d69c41756b Fix RFC1459 tests to pass with charybdis
only oragono replies to PINGs before a valid NICK afaik.
2021-02-16 00:33:46 +01:00
Valentin Lorentz 9b2a6a063c Don't pass a 'config' argument to the controller, only Oragono had it.
Instead, annotate tests with the optional features they may need from the IRCd.
2021-02-15 23:29:10 +01:00