test: remove redundant schema validation tests#40022
test: remove redundant schema validation tests#40022sampaiodiego wants to merge 4 commits intodevelopfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40022 +/- ##
===========================================
- Coverage 70.56% 70.51% -0.06%
===========================================
Files 3270 3270
Lines 116766 116766
Branches 21058 21076 +18
===========================================
- Hits 82397 82332 -65
- Misses 32317 32383 +66
+ Partials 2052 2051 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
These tests only validated payload schema rejection (missing/invalid params) which is now enforced at build time by the new API.v1.get/post pattern with AJV-compiled validators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These tests validated AJV schema rejection (empty _id, regex injection via query object/bracket syntax) which is now enforced at build time by the new API.v1.get pattern with compiled validators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove 9 tests that only validated schema rejection (empty userId/msgId/ reportId, missing description) for endpoints now using the new API.v1.get/post pattern with AJV-compiled validators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove 7 schema validation tests for push.token POST and DELETE endpoints which have been migrated to the new API.v1.post/delete pattern with AJV-compiled validators. Tests for push.get and push.info (still using addRoute) are preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
777c7a1 to
eb33c87
Compare
Proposed changes (including videos or screenshots)
Since the new API for creating endpoints (like
API.v1.get|post) has mandatory schemas for build time validation of the params and response, we can rely on that only for payload validations, we don't need to use slow end-to-end tests for that purpose.So as we move forward converting endpoints to the new API the idea is to also remove these end-to-end tests so they run even faster and test what matters which is the business logic and actual impact.
Issue(s)
Steps to test or reproduce
Further comments