-
Notifications
You must be signed in to change notification settings - Fork 918
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
Added test file for features package #5350
Added test file for features package #5350
Conversation
Signed-off-by: Anuj Agrawal <[email protected]>
@anujagrawal699: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #5350 +/- ##
==========================================
- Coverage 28.53% 28.52% -0.02%
==========================================
Files 632 632
Lines 43856 43856
==========================================
- Hits 12515 12509 -6
- Misses 30443 30447 +4
- Partials 898 900 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Anuj Agrawal <[email protected]>
Hi @anujagrawal699 can you remind me which files the current PR improves test coverage for? |
I added a test file for features package which has test coverage of 100%. |
Before the test file is added, it looks like it's covered by the test, ref https://app.codecov.io/gh/karmada-io/karmada/tree/master/pkg%2Ffeatures |
But a test file was not present in that features package directory. That's the reason i implemented this tests. |
I used |
Yes, you're right. Looking at the file alone, there is no test file, but the only method in the file is the init method, which is called when other files use the package. |
Hi @anujagrawal699 can we close this pr? |
@XiShanYongYe-Chang Yeah sure. |
Description:
This PR adds the unit tests for the features package to ensure its functionality and maintainability. By adding these tests, we aim to increase the reliability and code coverage of this critical component.
Implemented Tests:
What type of PR is this?
/kind test
/kind enhancement
Test Coverage:
The improvements in this PR increase the test coverage of the features package to 100%. This can be verified in the file directory pkg/features using the command
go test -coverprofile=coverage.out
.What this PR does / why we need it:
The enhanced tests introduced in this PR will:
Which issue(s) this PR fixes:
Fixes part of #5236
Does this PR introduce a user-facing change?: