Skip to content

Use extendedPlugins in integrationTest framework for sample resource plugin testing #5322

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented May 9, 2025

Description

This PR takes advantage of the changes in opensearch-project/OpenSearch#16908 to setup the integrationTests in the sample-resource-plugin using extendedPlugins instead of the workaround that was introduced.

This PR also does a little refactoring on the share flow to modify sharing info of a resource in memory instead of painless which was failing for me locally in testing.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Refactoring

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • 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.

cwperks added 2 commits May 9, 2025 14:05
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Copy link

codecov bot commented May 9, 2025

Codecov Report

Attention: Patch coverage is 68.42105% with 12 lines in your changes missing coverage. Please review.

Project coverage is 72.01%. Comparing base (5bc2523) to head (eb361cd).

Files with missing lines Patch % Lines
...y/spi/resources/sharing/SharedWithActionGroup.java 0.00% 7 Missing ⚠️
...ecurity/spi/resources/sharing/ResourceSharing.java 62.50% 2 Missing and 1 partial ⚠️
...ecurity/resources/ResourceSharingIndexHandler.java 90.47% 0 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5322      +/-   ##
==========================================
+ Coverage   71.76%   72.01%   +0.25%     
==========================================
  Files         384      384              
  Lines       23882    23905      +23     
  Branches     3648     3651       +3     
==========================================
+ Hits        17139    17216      +77     
+ Misses       4912     4855      -57     
- Partials     1831     1834       +3     
Files with missing lines Coverage Δ
...arch/security/spi/resources/sharing/ShareWith.java 66.66% <100.00%> (+2.66%) ⬆️
...ecurity/resources/ResourceSharingIndexHandler.java 65.98% <90.47%> (+8.00%) ⬆️
...ecurity/spi/resources/sharing/ResourceSharing.java 57.14% <62.50%> (+6.54%) ⬆️
...y/spi/resources/sharing/SharedWithActionGroup.java 57.37% <0.00%> (-7.44%) ⬇️

... and 14 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -72,7 +71,7 @@ private SharedWithActionGroup.ActionGroupRecipients parseRevokedEntities(Map<Str
throw new IllegalArgumentException("entities_to_revoke is required and cannot be empty");
}

Map<Recipient, Set<String>> entitiesToRevoke = source.entrySet()
Map<Recipient, Collection<String>> entitiesToRevoke = source.entrySet()
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

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.

2 participants