-
Notifications
You must be signed in to change notification settings - Fork 103
CCXDEV-15561: Improve test coverage 3 #1213
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?
CCXDEV-15561: Improve test coverage 3 #1213
Conversation
|
@katushiik11: This pull request references CCXDEV-15561 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: katushiik11 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@katushiik11: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
| expected: "Critical", | ||
| }, | ||
| { | ||
| name: "invalid risk level 0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO one invalid test case should be enough
| expected: "", | ||
| }, | ||
| { | ||
| name: "single character", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the first two test cases should be enough to test this function
| expected: []byte(""), | ||
| }, | ||
| { | ||
| name: "single byte", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, keep only the first 2 test cases
| expected string | ||
| }{ | ||
| { | ||
| name: "basic URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these test cases could be probably drop as well
| expected []string | ||
| }{ | ||
| { | ||
| name: "multiple URLs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| expected string | ||
| }{ | ||
| { | ||
| name: "multiple URLs separated by commas", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
This PR implements tests to improve test coverage in directories insights, sca & utils/anonymize.
Categories
Sample Archive
Documentation
Unit Tests
pkg/insights/insightsreport/insightsreport_test.gopkg/insights/metrics_test.gopkg/ocm/sca/architectures_gather_test.gopkg/ocm/sca/sca_test.gopkg/utils/anonymize/string_test.gopkg/utils/anonymize/unstructured_test.gopkg/utils/anonymize/url_test.goPrivacy
Yes. There are no sensitive data in the newly collected information.
Changelog
No
Breaking Changes
No
References
https://issues.redhat.com/browse/CCXDEV-15561