-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add required tests for go/acl
#14943
Conversation
Signed-off-by: Noble Mittal <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Merged |
Signed-off-by: Florent Poinsard <[email protected]>
Forced push to re-trigger the code coverage, it did not appear even after an hour. |
Codecov report for this package: |
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.
The current changes are looking great to me, the coverage on acl.go
went from 58.82%
to 91.18%
thanks a bunch.
There is one if condition that has not been covered in acl.go
(shown here in red), it is the log.Fatalf
in the RegisterPolicy
function.
Moreover, do you think you could add test cases for the other files in this package deny_all_policy.go
and read_only_policy.go
?
Signed-off-by: Noble Mittal <[email protected]>
Signed-off-by: Noble Mittal <[email protected]>
@frouioui I added the test files for other files of the Moreover, I found that it's not recommended to test code containing |
@beingnoble03 thank you for the detailed explanation, that makes sense! |
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.
LGTM! Thank you 🥳
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.
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.
Done.
Signed-off-by: Noble Mittal <[email protected]>
@frouioui I've replace the |
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.
Thank you, @beingnoble03 !
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.
Thanks a bunch!
Description
This PR adds missing tests for
go/acl
Related Issue(s)
Fixes part of #14931
Checklist
Deployment Notes