Added tests for hpascaletargetmarker controller
Description: This PR introduces comprehensive unit tests for the HPA Scale Target Marker controller, predicate, and worker components. These tests aim to improve code reliability and facilitate easier maintenance and future development.
Additions:
- pkg/controllers/hpascaletargetmarker/hpa_scale_target_marker_controller_test.go
- pkg/controllers/hpascaletargetmarker/hpa_scale_target_marker_predicate_test.go
- pkg/controllers/hpascaletargetmarker/hpa_scale_target_marker_worker_test.go
Test Coverage:
- hpa_scale_target_marker_controller_test.go : 0% to 100%
- hpa_scale_target_marker_predicate_test.go : 0% to 96.7%
- hpa_scale_target_marker_worker_test.go : 0% to 70.3% Overall coverage of hpascaletargetmarker controller: 0% to 79.8%
What type of PR is this? /kind failing-test /kind feature
Which issue(s) this PR fixes: Fixes a part of #5470
Special notes for your reviewer:
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.13%. Comparing base (
ba360c9) to head (50634c5). Report is 50 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 #5553 +/- ##
==========================================
- Coverage 34.14% 34.13% -0.01%
==========================================
Files 643 645 +2
Lines 44524 44857 +333
==========================================
+ Hits 15203 15313 +110
- Misses 28165 28379 +214
- Partials 1156 1165 +9
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 34.13% <ø> (-0.01%) |
:arrow_down: |
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.
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
@chaosi-zju Please take a look.