-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: add method Validate for RouteService #368
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #368 +/- ##
==========================================
+ Coverage 52.56% 53.06% +0.50%
==========================================
Files 69 69
Lines 5175 5201 +26
==========================================
+ Hits 2720 2760 +40
+ Misses 1877 1857 -20
- Partials 578 584 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
3d9a370
to
1f86f14
Compare
fd30c6a
to
5370965
Compare
5370965
to
f32d693
Compare
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.
Is there a way to test this in isolation? It seems a bit silly to run all tests against both flavors when it only matters for the one in practice.
It's negligible that other test runs because the whole test suite ( |
Is |
Co-authored-by: Grzegorz Burzyński <[email protected]>
What this PR does / why we need it:
Gateway offers API for validating routes -
/schemas/routes/validate
. This PR extendsRouteService
with the methodValidate
(that calls aforementioned endpoint) and prepares the release of the new versionv0.47.0
.Which issue this PR fixes:
Prerequisite to implement Kong/kubernetes-ingress-controller#4557.
Special notes for your reviewer:
Hence this method will be used to validate expressions routes, extend tests with this configuration, and introduce a helper to skip tests when it is not applicable (also a small refactor to avoid unnecessary duplication). Extend the tests matrix with such a configuration, tests run quickly, but on the other hand, need a lot of runners - using
exclude
in workflow helps a lot. The number of checks increased from 45 to 66 (added Kong 3.4 to the matrix too).Change in
kong/vault_service_test.go
is needed, because more values are in this map (for Kong 3.4) and others are rather random/irrelevant nad the region is presented for older versions, thus it doesn't break anything.To consider: creating an issue for covering with tests routes when expressions router is enabled.