opensearch-project / security

🔐 Secure your cluster with TLS, numerous authentication backends, data masking, audit logging as well as role-based access control on indices, documents, and fields
https://opensearch.org/docs/latest/security-plugin/index/
Apache License 2.0
180 stars 263 forks source link

Refactor InternalUsers REST API test #4481

Open willyborankin opened 1 week ago

willyborankin commented 1 week ago

Description

Split up UserApiTest into 3 diff tests:

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 65.21739% with 8 lines in your changes missing coverage. Please review.

Project coverage is 64.94%. Comparing base (6dedfb4) to head (7beb272).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensearch-project/security/pull/4481/graphs/tree.svg?width=650&height=150&src=pr&token=rBpySfQXMt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)](https://app.codecov.io/gh/opensearch-project/security/pull/4481?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) ```diff @@ Coverage Diff @@ ## main #4481 +/- ## ========================================== - Coverage 65.21% 64.94% -0.28% ========================================== Files 313 313 Lines 22047 22061 +14 Branches 3559 3560 +1 ========================================== - Hits 14378 14327 -51 - Misses 5895 5952 +57 - Partials 1774 1782 +8 ``` | [Files](https://app.codecov.io/gh/opensearch-project/security/pull/4481?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project) | Coverage Δ | | |---|---|---| | [...java/org/opensearch/security/user/UserService.java](https://app.codecov.io/gh/opensearch-project/security/pull/4481?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fsecurity%2Fuser%2FUserService.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9zZWN1cml0eS91c2VyL1VzZXJTZXJ2aWNlLmphdmE=) | `44.52% <75.00%> (-12.52%)` | :arrow_down: | | [...security/dlic/rest/api/InternalUsersApiAction.java](https://app.codecov.io/gh/opensearch-project/security/pull/4481?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fopensearch%2Fsecurity%2Fdlic%2Frest%2Fapi%2FInternalUsersApiAction.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project#diff-c3JjL21haW4vamF2YS9vcmcvb3BlbnNlYXJjaC9zZWN1cml0eS9kbGljL3Jlc3QvYXBpL0ludGVybmFsVXNlcnNBcGlBY3Rpb24uamF2YQ==) | `73.80% <60.00%> (-7.77%)` | :arrow_down: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/opensearch-project/security/pull/4481/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensearch-project)