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

Refactor Roles REST API test and partial fix #4166 #4433

Merged
merged 3 commits into from
Jun 20, 2024

Conversation

willyborankin
Copy link
Collaborator

Description

Refactor Roles REST API test

Issues Resolved

partial fix #4166

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

@willyborankin willyborankin force-pushed the refactor-tests#6 branch 2 times, most recently from 9257162 to bad734b Compare June 11, 2024 09:23
@willyborankin willyborankin added the backport 2.x backport to 2.x branch label Jun 11, 2024
@willyborankin willyborankin force-pushed the refactor-tests#6 branch 3 times, most recently from 6c8f8ec to 681b95c Compare June 11, 2024 14:12
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.23%. Comparing base (439606c) to head (a88c04e).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4433      +/-   ##
==========================================
- Coverage   65.24%   65.23%   -0.01%     
==========================================
  Files         312      312              
  Lines       22032    22032              
  Branches     3558     3558              
==========================================
- Hits        14374    14372       -2     
- Misses       5888     5890       +2     
  Partials     1770     1770              
Files Coverage Δ
...nsearch/security/dlic/rest/api/RolesApiAction.java 98.03% <100.00%> (+0.08%) ⬆️
...g/opensearch/security/dlic/rest/support/Utils.java 59.45% <100.00%> (-1.07%) ⬇️

... and 3 files with indirect coverage changes

cwperks
cwperks previously approved these changes Jun 12, 2024
Copy link
Member

@cwperks cwperks left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you @willyborankin. Thank you for verifying that the new integ test covers the same scenarios as the old integ tests. Its good to see that the coverage goes slightly up and the new code introduced in this PR to allow superadmin to update with "hidden" is also covered.

@willyborankin willyborankin force-pushed the refactor-tests#6 branch 2 times, most recently from 9fbb7e9 to e4a0fd6 Compare June 14, 2024 13:59
@willyborankin willyborankin force-pushed the refactor-tests#6 branch 4 times, most recently from f5073d9 to 857df27 Compare June 14, 2024 17:16
Signed-off-by: Andrey Pleskach <ples@aiven.io>
Signed-off-by: Andrey Pleskach <ples@aiven.io>
Signed-off-by: Andrey Pleskach <ples@aiven.io>
Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

@willyborankin I see some overlap with #4450. Should we combine these into 1 PR?

@willyborankin
Copy link
Collaborator Author

@willyborankin I see some overlap with #4450. Should we combine these into 1 PR?

@DarshitChanpura, Yes I tested #4450 with internal-test fixes I added in this PR. So this one should be merged first.

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

LGTM!

@reta reta merged commit 962eafa into opensearch-project:main Jun 20, 2024
42 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-4433-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 962eafab80fac3064de02b76bc956ee031703e0e
# Push it to GitHub
git push --set-upstream origin backport/backport-4433-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-4433-to-2.x.

willyborankin added a commit to willyborankin/security that referenced this pull request Jun 20, 2024
…pensearch-project#4433)

Signed-off-by: Andrey Pleskach <ples@aiven.io>
(cherry picked from commit 962eafa)
@willyborankin willyborankin deleted the refactor-tests#6 branch June 23, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add posibility to create hidden security entities (roles mapping, roles, etc) via REST API
5 participants