Add ability to exclude tests for deprecated endpoints#881
Merged
Conversation
clokep
reviewed
Jun 2, 2020
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
richvdh
reviewed
Jun 2, 2020
richvdh
previously requested changes
Jun 3, 2020
Member
richvdh
left a comment
There was a problem hiding this comment.
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).
Comment on lines
+873
to
+876
| if ($req eq "deprecated_endpoints" && !$INCLUDE_DEPRECATED_ENDPOINTS) { | ||
| $excluded_count++; | ||
| next TESTS; | ||
| } |
| test "initialSync sees my presence status", | ||
| requires => [ local_user_fixture( with_events => 1 ), | ||
| qw( can_initial_sync )], | ||
| qw( can_initial_sync, deprecated_endpoints )], |
Member
There was a problem hiding this comment.
Suggested change
| qw( can_initial_sync, deprecated_endpoints )], | |
| qw( can_initial_sync deprecated_endpoints )], |
| "$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 ) ], |
Member
There was a problem hiding this comment.
long line is long
Suggested change
| 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>
richvdh
reviewed
Aug 13, 2020
Member
richvdh
left a comment
There was a problem hiding this comment.
looks good. Can you add some words to https://github.com/matrix-org/sytest/blob/develop/DEVELOP.rst?
anoadragon453
added a commit
that referenced
this pull request
Oct 21, 2020
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a new
deprecated_endpointsqw 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.