-
Notifications
You must be signed in to change notification settings - Fork 33
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 public-viewer support to MemberClusterService #450
add public-viewer support to MemberClusterService #450
Conversation
this commit is part of the effort of splitting PR codeready-toolchain#443 Signed-off-by: Francesco Ilario <filario@redhat.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #450 +/- ##
==========================================
+ Coverage 78.40% 78.56% +0.15%
==========================================
Files 42 42
Lines 2677 2696 +19
==========================================
+ Hits 2099 2118 +19
Misses 487 487
Partials 91 91
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Overall looks good (I haven't look at the tests yet)!
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.
Overall looks good! Great job 👍
One comment I have is that the unit tests are becoming more complicated to follow now, I wonder if we really need to check all the cases with the additional layers , or if we could just add new test cases targeting the public viewer scenarios and configure the existing tests with publicViewer set to |
Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
When public-viewer is enabled we expect the same behavior we have when public-viewer is disabled with a few exception for the KubesawAuthenticated user. So IMO to test it correctly we need to test the the same tests are passing with either public-viewer enabled and disabled. Unfortunately this complicates tests. |
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.
Great job! And good test coverage. However, if I not mistaken, there is one test case missing: the public viewer access is disabled but the public viewer authenticated username is used.
I looked into it and eventually decided to not add this test case because
Btw, it should not be neither difficult nor harmful to have this test case. WDYT, should we add it anyway? |
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.
kube is in the list of forbidden prefixes so it should never happen as kubesaw-authenticated matches it
even if it existed, it would be treated as a normal user (scenario already tested)
Btw, it should not be neither difficult nor harmful to have this test case. WDYT, should we add it anyway?
OK. It makes sense. The only reason for such test would be to make sure that using kubesaw-authenticated
would still require the public viewer feature to be enabled. See my comment below.
the public viewer access is disabled but the public viewer authenticated username is used Signed-off-by: Francesco Ilario <filario@redhat.com>
Signed-off-by: Francesco Ilario <filario@redhat.com>
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.
Looks good! Thanks. Just one minor comment.
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.
Great Job 👍
Thanks for addressing my comments!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexeykazakov, filariow, mfrancisc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Francesco Ilario <filario@redhat.com>
Quality Gate passedIssues Measures |
/test e2e |
/retest |
/retest worker setup is failing when downloading Go SDK
|
/retest |
This PR is part of the effort of splitting PR #443
Signed-off-by: Francesco Ilario filario@redhat.com