Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Split up event validation between event and builder #4494

Merged
merged 5 commits into from
Jan 29, 2019

Conversation

erikjohnston
Copy link
Member

The validator was being run on the EventBuilder objects, and so the
validator only checked a subset of fields. With the upcoming
EventBuilder refactor even fewer fields will be there to validate.

To get around this we split the validation into those that can be run
against an EventBuilder and those run against a fully fledged event.

The validator was being run on the EventBuilder objects, and so the
validator only checked a subset of fields. With the upcoming
EventBuilder refactor even fewer fields will be there to validate.

To get around this we split the validation into those that can be run
against an EventBuilder and those run against a fully fledged event.
@codecov-io
Copy link

Codecov Report

Merging #4494 into develop will increase coverage by 0.02%.
The diff coverage is 86.66%.

@@             Coverage Diff             @@
##           develop    #4494      +/-   ##
===========================================
+ Coverage    74.77%   74.79%   +0.02%     
===========================================
  Files          336      336              
  Lines        34141    34158      +17     
  Branches      5553     5558       +5     
===========================================
+ Hits         25530    25550      +20     
+ Misses        7033     7032       -1     
+ Partials      1578     1576       -2

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally seems sane, a few nits/questions

synapse/events/validator.py Outdated Show resolved Hide resolved
synapse/events/validator.py Outdated Show resolved Hide resolved
synapse/events/validator.py Show resolved Hide resolved
synapse/events/validator.py Outdated Show resolved Hide resolved
@erikjohnston erikjohnston requested a review from richvdh January 29, 2019 10:41
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@erikjohnston erikjohnston merged commit 073f6c2 into develop Jan 29, 2019
@erikjohnston erikjohnston deleted the erikj/fixup_event_validator branch March 5, 2019 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants