Skip to content
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

[Improvement-12782][UT] Add UT for the 13 implementations of ResourceAcquisitionAndPermissionCheck #12784

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

rickchengx
Copy link
Contributor

@rickchengx rickchengx commented Nov 7, 2022

Purpose of the pull request

Brief change log

  • Since listAuthorizedResource() returns the resource ids rather than the resource, rename this method to listAuthorizedResourceIds() to remove ambiguity
  • Add UT for the 13 implementations of ResourceAcquisitionAndPermissionCheck

image

Verify this pull request

covered by UT

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2022

Codecov Report

Merging #12784 (d784cc6) into dev (a2ff140) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                dev   #12784      +/-   ##
============================================
+ Coverage     39.38%   39.44%   +0.05%     
+ Complexity     4272     4271       -1     
============================================
  Files          1067     1067              
  Lines         40120    40120              
  Branches       4605     4605              
============================================
+ Hits          15801    15825      +24     
+ Misses        22540    22518      -22     
+ Partials       1779     1777       -2     
Impacted Files Coverage Δ
...permission/ResourcePermissionCheckServiceImpl.java 98.46% <100.00%> (+24.61%) ⬆️
...r/plugin/registry/zookeeper/ZookeeperRegistry.java 43.54% <0.00%> (-6.46%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -540,7 +541,7 @@
* @param userId
* @return
*/
Set<T> listAuthorizedResource(int userId, Logger logger);
Set<T> listAuthorizedResourceIds(int userId, Logger logger);

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'logger' is never used.
@sonarcloud
Copy link

sonarcloud bot commented Nov 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 52 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@EricGao888 EricGao888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EricGao888 EricGao888 added improvement make more easy to user or prompt friendly test labels Dec 24, 2022
@EricGao888 EricGao888 added this to the 3.2.0 milestone Dec 24, 2022
@EricGao888 EricGao888 added the 3.2.0 for 3.2.0 version label Mar 1, 2023
@EricGao888 EricGao888 merged commit eb4cba8 into apache:dev Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.0 for 3.2.0 version backend improvement make more easy to user or prompt friendly test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][UT] Add UT for the 13 implementations of ResourceAcquisitionAndPermissionCheck
3 participants