Add unit tests for server logic#294
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
7717d8c to
54b6bc3
Compare
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #294 +/- ##
==========================================
+ Coverage 47.52% 47.81% +0.28%
==========================================
Files 63 66 +3
Lines 9799 9864 +65
==========================================
+ Hits 4657 4716 +59
- Misses 4585 4589 +4
- Partials 557 559 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
|
@veophi can u help me with this linter failing workflow , i am running it locally but it still fails somehow , never happened for other prs! |
What this PR does / Why we need it
The
pkg/webhook/server.gofile contains the core logic for registering and managing webhook handlers. This PR introduces unit tests to validate this logic, ensure its correctness, and prevent future regressions.Scope of Testing
These tests focus on the pure, stateless logic functions within the file:
The integration functions (SetupWithManager, initialize), which are responsible for wiring together controller-runtime components and involve concurrency, have been intentionally excluded from this unit test suite. They are better suited for future integration tests.