-
Notifications
You must be signed in to change notification settings - Fork 59
Add ability to exclude tests for deprecated endpoints #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using requires
in this way will mean that the tests are skipped in a normal run:
Testing if: POST /rooms/:room_id/state/m.room.name sets name... SKIP due to lack of can_room_initial_sync
Testing if: GET /rooms/:room_id/state/m.room.name gets name... SKIP due to lack of can_set_room_name
Testing if: POST /rooms/:room_id/state/m.room.topic sets topic... SKIP due to lack of can_room_initial_sync
Testing if: GET /rooms/:room_id/state/m.room.topic gets topic... SKIP due to lack of can_set_room_topic
I think a better way would just be to define a different parameter instead of requires
(and do the filtering in _push_test
).
run-tests.pl
Outdated
if ($req eq "deprecated_endpoints" && !$INCLUDE_DEPRECATED_ENDPOINTS) { | ||
$excluded_count++; | ||
next TESTS; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
tests/21presence-events.pl
Outdated
@@ -4,7 +4,7 @@ | |||
|
|||
test "initialSync sees my presence status", | |||
requires => [ local_user_fixture( with_events => 1 ), | |||
qw( can_initial_sync )], | |||
qw( can_initial_sync, deprecated_endpoints )], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qw( can_initial_sync, deprecated_endpoints )], | |
qw( can_initial_sync deprecated_endpoints )], |
@@ -131,7 +131,7 @@ sub test_history_visibility | |||
test( | |||
"$name non-joined user can call /events on world_readable room", | |||
|
|||
requires => [ $fixture->(), local_user_fixture( with_events => 1 ), local_user_fixture( with_events => 1 ) ], | |||
requires => [ $fixture->(), local_user_fixture( with_events => 1 ), local_user_fixture( with_events => 1 ), qw ( deprecated_endpoints ) ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long line is long
requires => [ $fixture->(), local_user_fixture( with_events => 1 ), local_user_fixture( with_events => 1 ), qw ( deprecated_endpoints ) ], | |
requires => [ | |
$fixture->(), local_user_fixture( with_events => 1 ), local_user_fixture( with_events => 1 ), | |
qw ( deprecated_endpoints ), | |
], |
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Can you add some words to https://github.com/matrix-org/sytest/blob/develop/DEVELOP.rst?
…c_release_1_21_x * origin/release-v1.20.1: (27 commits) Pin Alien::Sodium to an old version, to fix install errors (#949) Disable rate limiting on Dendrite (#947) Wait for synapse to start by using sd_notify. (#943) Fix bad tests (#939) Add ability to exclude tests for deprecated endpoints (#881) Abide by the spec when making /keys/query requests When putting device keys, may the JSON body spec compliant Remove trailing slashes from /state_ids and /backfill in ACL tests (#936) Fix /send server ACL test to match spec (#935) Call matrix_get_e2e_keys correctly Removed unused params from pydron invocation (#931) Deflake 'Server correctly resyncs when server leaves and rejoins a room' (#932) Dendrite configuration format v1 (#921) Disable TLS validation for Dendrite Set Dendrite loglevel to trace (#933) Merge Synapse::ViaHaproxy and -I Synapse::Dendron (#930) Use ProcessManager in Synapse.pm (#929) Add redis support to synapse docker image (#928) Update the README for the docker images (#927) Some minor cleanups to the startup scripts (#926) ...
This adds a new
deprecated_endpoints
qw torequire
, and adds a command-line flag--exclude-deprecated
. The idea is that we can not bother running tests at all that test endpoints that we know are deprecated, e.g. in Dendrite we will never implement/initialSync
.