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

Use KeyStoreManager to get primary keystore #2577

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

hwupathum
Copy link
Contributor

@hwupathum hwupathum commented Sep 23, 2024

Proposed changes in this pull request

  • Use KeyStoreManager to get primary keystore and internal keystore instead of reading the file again.

Related PRs

Related Issues

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 38.08%. Comparing base (47e1a17) to head (dbcf28f).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...o2/carbon/identity/oauth2/util/HttpClientUtil.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #2577       +/-   ##
=============================================
- Coverage     55.45%   38.08%   -17.38%     
+ Complexity     8022     5295     -2727     
=============================================
  Files           632      584       -48     
  Lines         45888    44392     -1496     
  Branches       7034     6525      -509     
=============================================
- Hits          25449    16908     -8541     
- Misses        16722    25135     +8413     
+ Partials       3717     2349     -1368     
Flag Coverage Δ
conformance-fapi ?
conformance-oidc ?
integration ?
unit 38.08% <66.66%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -228,6 +221,8 @@ protected Map<String, Object> initialValue() {
keyStoreManager.when(() -> KeyStoreManager.getInstance(anyInt())).thenReturn(mockKeyStoreManager);
lenient().when(mockKeyStoreManager.getKeyStore("foo-com.jks")).thenReturn(
getKeyStoreFromFile("foo-com.jks", "foo.com"));
lenient().when(mockKeyStoreManager.getPrimaryKeyStore()).thenReturn(
Copy link
Contributor

Choose a reason for hiding this comment

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

Why to we include file retrieval in the test ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although we are moving to PKCS12 keystores, still we have JKS keystores in other repositories for unit tests

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11054703085

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11054703085
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11054703085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants