-
Notifications
You must be signed in to change notification settings - Fork 83
Add unit tests for server logic #294
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
base: master
Are you sure you want to change the base?
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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: GautamBytes <[email protected]>
7717d8c to
54b6bc3
Compare
Signed-off-by: GautamBytes <[email protected]>
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 <[email protected]>
Signed-off-by: GautamBytes <[email protected]>
Signed-off-by: GautamBytes <[email protected]>
|
@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.