-
Notifications
You must be signed in to change notification settings - Fork 128
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
tests: add integration test for kong2kic #1235
Conversation
battlebyte
commented
Mar 4, 2024
- Granular tests based on each resource type
- Integration test deploys generated manifests to k8s cluster
- Refactor code to add annotations for tags
- Fix consumer group plugin bug
- Inform plugin attributes: enabled, runon, ordering, protocols
- Generate external service when host is informed and there is no upstream match
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1235 +/- ##
==========================================
- Coverage 29.14% 28.17% -0.98%
==========================================
Files 59 61 +2
Lines 5215 5061 -154
==========================================
- Hits 1520 1426 -94
+ Misses 3587 3512 -75
- Partials 108 123 +15 ☔ View full report in Codecov by Sentry. |
d87663c
to
e220e74
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 command to regenerate output? kong2kic/testdata/README.md
doesn't mention one and I don't see an existing make
target for it. It's unclear how you should update expected output if input or transform code changes. If the answer is "by hand", it shouldn't be.
I don't much love golden output tests for purposes other than showing what a diff is, and they're especially iffy if presented in isolation and without comment on what a particular input/output test is supposed to demonstrate. I'd prefer having more focused units around "field X in input transforms to fields Y+Z in output as expected" as a base, with golden full input/output comparison as backup material to highlight any differences we may not have accounted for in the units.
Golden-style tests end up being particularly challenging for tools that expect to support multiple versions of adjacent software, where we end up with things like this sync test change that are essentially 98% the same as some other version's test case, but require significant input/output duplication because the surrounding checks aren't flexible enough to handle the 2% that is different between versions.
Closing this due to lack of activity. Please re-open if needed. |
@hbagdi I will implement some of the suggestions shortly. |
6906569
to
06ac247
Compare
c88fb0d
to
fab0096
Compare
- Granular tests based on each resource type - Integration test deploys generated manifests to k8s cluster - Refactor code to add annotations for tags - Fix consumer group plugin bug - Inform plugin attributes: enabled, runon, ordering, protocols - Generate external service when host is informed and there is no upstream match - Increased test coverage KIC versions 2.12, 3.0, 3.1, 3.2, 3.3
fab0096
to
0558aba
Compare