Added tests for mcs controller
Description: This PR introduces comprehensive unit tests for the Multi-Cluster Services (MCS) controllers. These tests aim to improve code reliability and facilitate easier maintenance and future development.
Additions:
- pkg/controllers/mcs/endpointslice_controller_test.go
- pkg/controllers/mcs/service_export_controller_test.go
- pkg/controllers/mcs/service_import_controller_test.go
Test Coverage:
- endpointslice_controller_test.go : 0% to 46%
- service_export_controller_test.go : 0% to 39.1%
- service_import_controller_test.go : 0% to 65%
Overall coverage of MCS controller : 0% to 44.4%
What type of PR is this? /kind failing-test /kind feature
Which issue(s) this PR fixes: Fixes a part of #5470
Does this PR introduce a user-facing change?:
NONE
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 34.43%. Comparing base (
ec0521a) to head (8a4923f). Report is 346 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #5566 +/- ##
==========================================
+ Coverage 34.15% 34.43% +0.27%
==========================================
Files 643 645 +2
Lines 44515 44857 +342
==========================================
+ Hits 15203 15445 +242
- Misses 28155 28240 +85
- Partials 1157 1172 +15
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 34.43% <ø> (+0.27%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
- Flaky Tests Detection - Detect and resolve failed and flaky tests
Thanks /assign
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from xishanyongye-chang. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
@XiShanYongYe-Chang Made the changes as you suggested.