Commit Graph

373 Commits

Author SHA1 Message Date
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
Shivaram Lingamneni de49571b1e add test coverage for RPL_TOPIC 2021-02-08 17:47:11 -05:00
Shivaram Lingamneni b58fe44b5b update relaymsg test 2020-12-21 22:06:13 -05:00
Shivaram Lingamneni 307722fbec test the multiline batch tag 2020-12-15 04:41:25 -05:00
Shivaram Lingamneni 0b9087cc39 rename test 2020-12-14 22:55:49 -05:00
Shivaram Lingamneni 40ac45cdbe add a channel forwarding test 2020-12-14 05:22:41 -05:00
Shivaram Lingamneni 5aeb297de5 fix relaymsg test fail code 2020-12-07 02:25:20 -05:00
Shivaram Lingamneni 8c66157a9e test that TAGMSG are not sent to users with only server-time 2020-11-30 17:00:06 -05:00
Shivaram Lingamneni 3b489a2125 test long-line DoS attacks 2020-11-30 13:18:02 -05:00
Shivaram Lingamneni 14435ce0e8 regression test for oragono #1411 2020-11-29 19:32:29 -05:00
Shivaram Lingamneni a723791942 add a test for message-tags and ERR_INPUTTOOLONG 2020-11-29 18:54:37 -05:00
Shivaram Lingamneni d741ab86d5 add a test for message-tags 2020-11-26 00:25:52 -05:00
Shivaram Lingamneni b7975ada46 allow message-tags to enable account tag implicitly
Servers MAY send arbitrary server tags (time, msgid, account) to clients
that have enabled message-tags.
2020-11-24 21:22:59 -05:00
Shivaram Lingamneni b43e127805 modify chathistory test to check for INVALID_TARGET 2020-11-04 01:51:51 -05:00
Shivaram Lingamneni 512b4bd74d add regression test for oragono #1370 2020-11-01 18:14:57 -05:00
Shivaram Lingamneni d48cbc4287 oragono-specific test for unregistered lusers counts 2020-10-21 19:47:49 -04:00
Shivaram Lingamneni 215ed3171b test unregistered counts in LUSERS 2020-10-21 19:46:00 -04:00
Shivaram Lingamneni 95a26bfa57 add a test for +m 2020-10-21 19:26:31 -04:00
Shivaram Lingamneni 706e794df6 test for mute extban 2020-10-21 11:08:14 -04:00
Shivaram Lingamneni 62197e4c4d test for +U opmoderated 2020-10-20 13:42:51 -04:00
Shivaram Lingamneni f0eb6e4e80 test for lusers 2020-10-15 22:40:11 -04:00
Shivaram Lingamneni 513c74a52b regression test for #1312 2020-10-13 09:22:07 -04:00
Shivaram Lingamneni 1ac1c1c6a7 basic integration tests for REGISTER/VERIFY 2020-10-09 08:38:53 -04:00
Shivaram Lingamneni d144dad001 enable strict nickname reservation 2020-10-09 08:38:18 -04:00
Shivaram Lingamneni 0c069b7418 test no-CTCP mode 2020-10-02 12:41:13 -04:00
Shivaram Lingamneni 616785eae4 test topic privileges 2020-10-02 07:50:14 -04:00
Shivaram Lingamneni b2a1df41bd fix auditorium test, unvoiced users can speak 2020-10-01 18:02:51 -04:00
Shivaram Lingamneni 9eef97e615 test for auditorium mode 2020-10-01 10:49:59 -04:00
Shivaram Lingamneni a67cfea82f rename relaymsg oper capab 2020-10-01 09:47:21 -04:00
Shivaram Lingamneni 0287b83797 add a test for SCENE 2020-09-16 12:12:24 -04:00
Shivaram Lingamneni 59eb7502f5 fix addMysqlToConfig 2020-09-16 12:09:06 -04:00
Shivaram Lingamneni 9cf318ed66 improve synchronization 2020-09-14 08:14:47 -04:00
Shivaram Lingamneni 1614c5a888 speed up oragono tests by reducing the port wait interval 2020-09-14 04:41:08 -04:00
Shivaram Lingamneni d7c231ba9e remove psutil 2020-09-13 06:47:50 -04:00
Shivaram Lingamneni a14ebf9ec2 remove scram 2020-09-13 06:41:06 -04:00
Shivaram Lingamneni c5e565ed27 remove ecdsa 2020-09-13 06:39:53 -04:00
Shivaram Lingamneni 8851083a3e remove limnoria/supybot 2020-09-13 06:38:15 -04:00
Shivaram Lingamneni 61941e2be0 test for RELAYMSG 2020-09-10 02:31:23 -04:00
Shivaram Lingamneni ceb2431134 compatibility with #1248 2020-09-06 21:37:47 -04:00
Shivaram Lingamneni f09ec7d9aa add more nickname tests 2020-08-30 16:22:25 -04:00
Shivaram Lingamneni ed2b6148e5 add regression test for #1252 2020-08-29 23:33:42 -04:00
Shivaram Lingamneni 0bdbe2ce24 fix * being accepted as a nick during registration 2020-08-29 23:23:24 -04:00
Shivaram Lingamneni 347e4fd74a compatibility with #1204 2020-07-23 23:13:17 -04:00
Shivaram Lingamneni 829cb38863 test 2-argument form of znc *playback 2020-07-22 20:41:30 -04:00
Shivaram Lingamneni 59e3b873ea add away-notify tests 2020-07-17 02:54:03 -04:00
Shivaram Lingamneni 23d6fecae9 fix tagmsg-storage 2020-07-09 19:40:51 -04:00
Shivaram Lingamneni d1f15fb05c fix #1179 2020-07-06 04:27:53 -04:00
Shivaram Lingamneni b54a1b1455 add draft/persist to chathistory tagmsg test 2020-07-01 14:35:11 -04:00
Shivaram Lingamneni 4e9de71f7d use FAIL as per review fix 2020-06-22 18:53:43 -04:00
Shivaram Lingamneni bdefa32d3a add a test for utf8 enforcement 2020-06-22 15:48:56 -04:00
Shivaram Lingamneni a87416e5ee fix incorrect class name 2020-05-28 18:40:22 -04:00
Shivaram Lingamneni e5789f9a37 add a test for #1076 2020-05-28 18:39:02 -04:00
Shivaram Lingamneni 40364408a4 add tagmsg replay test 2020-05-22 12:03:44 -04:00
Shivaram Lingamneni 53f5ef711e channel key tests 2020-05-18 03:56:36 -04:00
Shivaram Lingamneni b208baaa11 add blank line test 2020-05-14 12:27:38 -04:00