Val Lorentz
a15025a276
Add tests for JOIN with some invalid channels in the target param ( #163 )
2022-04-16 12:15:56 +02:00
Val Lorentz
45dd42e682
Replace incorrect uses of NotImplementedByController exception ( #161 )
2022-04-15 16:01:36 +02:00
Val Lorentz
a39ce7f19b
Merge branch 'master' into elist
2022-04-13 18:57:46 +02:00
Val Lorentz
2bc68a2208
Use xfail instead of deselection for known failures ( #155 )
2022-04-12 22:36:28 +02:00
Valentin Lorentz
10b6f8d6da
Remove useless 'OptionalityHelper'.
2022-04-12 18:48:03 +02:00
Shivaram Lingamneni
3083aeeb24
fix processing of multiline CAP LS 302 output ( #153 )
...
connectClient implicitly assumed that the CAP LS 302 output would be
a single registration message. This caused incorrect skipping of some tests
with `skip_if_cap_nak=True`, for example
RegisterEmailVerifiedTestCase.testAfterConnect on Ergo.
Technically there is no need for connectClient to send CAP LS before CAP REQ;
however, this provides additional test coverage for the syntactic correctness
of the CAP LS output in multiple server configurations, so we might as well
keep it.
2022-04-10 08:39:30 +02:00
Valentin Lorentz
72a12ff5ce
Add support for 'faketime', to avoid long sleeps in upcoming ELIST tests
2022-03-27 17:08:40 +02:00
Valentin Lorentz
3f483243d9
Minor readability improvement
2022-03-27 17:07:29 +02:00
Val Lorentz
da005d7d24
Add tests for WHOX. ( #131 )
2022-02-21 21:43:22 +01:00
Valentin Lorentz
d34175d6a8
Fix message matching on empty prefix/params/tags/...
2022-02-19 11:54:44 +01: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
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
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
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
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
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
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
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
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
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
Valentin Lorentz
1e0de7aefb
assertMessageMatch: Add pattern-matching on tags, and start using it.
2021-03-01 21:59:50 +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
f7be6cf016
Make all remaining tests not Oragono-specific when relevant.
2021-02-28 09:57:16 +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
51d0ce4483
Remove getIsupport(), it's redundant with server_support
2021-02-27 16:00:28 +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
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
ff67739c67
Add _IrcTestCase.messageDiffers to allow matching messages without using assertions.
2021-02-26 19:16:24 +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
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
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
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