-
Notifications
You must be signed in to change notification settings - Fork 281
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
Adds a basic sanity test to run against a remote cluster #1958
Adds a basic sanity test to run against a remote cluster #1958
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1958 +/- ##
============================================
- Coverage 61.05% 61.04% -0.02%
Complexity 3233 3233
============================================
Files 256 256
Lines 18085 18085
Branches 3222 3222
============================================
- Hits 11042 11040 -2
- Misses 5467 5470 +3
+ Partials 1576 1575 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the changes are good. Lets take a test dependency on common-utils instead.
src/test/java/org/opensearch/security/sanity/tests/SecurityRestTestCase.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/security/sanity/tests/SecurityRestTestCase.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/security/sanity/tests/SingleClusterSanityIT.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the changes look good to me.
Dropped a tiny comment.
scripts/integtest.sh
Outdated
USERNAME=`echo $CREDENTIAL | awk -F ':' '{print $1}'` | ||
PASSWORD=`echo $CREDENTIAL | awk -F ':' '{print $2}'` | ||
|
||
./gradlew integTestRemote -Dtests.rest.cluster="$BIND_ADDRESS:$BIND_PORT" -Dtests.cluster="$BIND_ADDRESS:$BIND_PORT" -Dsecurity_enabled=$SECURITY_ENABLED -Dtests.clustername=$CLUSTER_NAME -Dhttps=true -Duser=$USERNAME -Dpassword=$PASSWORD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, add common-utils version as a property.
Also check if opensearch build systems can send out common-utils version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't part of version.properties. Should we add it there? I'm not sure about other ways it can be passed. I looked around but couldn't find any reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a CI task to run these tests on pull requests to be sure these are operational?
Done. Added it as a task to |
9e9ff83
to
f02a3ee
Compare
The CI checks are failing after incrementing main to version 2.2.0.0 because it is now expecting to find common-utils with version 2.2.0.0
I would suggest to hard-code the common-utils version in build.gradle as we are also referencing |
I think this is the easiest way to keep moving forward, but please create a bug in common-utils to track this. It seems like the dependencies we've taken on should be inside of OpenSearch's core repo |
e654f6e
to
f143722
Compare
Here is the tracking issue in common-utils repository: opensearch-project/common-utils#205 |
7499728
to
a950a8e
Compare
Following the comment in the tracking issue, hard-coded reference to |
Local debugging of CI task This error occurs after upgrading gradle to 7.5 and is worked on in the core and a fix has been addressed here |
@DarshitChanpura Anything you need help with to get this ready for merging? |
Bwc test CI run fails with :
but local skips bwc tests with
Any ideas on how to solve this? |
When you run gradle add the |
added it, still the same result. I think it has something to do with the filter to exclude tests |
I tried to print System properties to see whether these type of |
I was able to replicate it on my local machine. |
3fa53a6
to
68329f9
Compare
Signed-off-by: Darshit Chanpura <[email protected]>
484f990
to
5dea70e
Compare
Signed-off-by: Darshit Chanpura <[email protected]>
5dea70e
to
6d6fd75
Compare
* Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]> (cherry picked from commit f7b6fe5)
* Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]> (cherry picked from commit f7b6fe5)
* Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]> (cherry picked from commit f7b6fe5) Co-authored-by: Darshit Chanpura <[email protected]>
* Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]> (cherry picked from commit f7b6fe5) Co-authored-by: Darshit Chanpura <[email protected]>
…project#1958) * Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]>
…project#1958) * Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]> Signed-off-by: Stephen Crawford <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-1958-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f7b6fe588f0eb44c1767b8b6c00ca0bf3f121606
# Push it to GitHub
git push --set-upstream origin backport/backport-1958-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.3 1.3
# Navigate to the new working tree
cd .worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-1958-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f7b6fe588f0eb44c1767b8b6c00ca0bf3f121606
# Push it to GitHub
git push --set-upstream origin backport/backport-1958-to-1.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.3 Then, create a pull request where the |
…project#1958) (opensearch-project#2017) * Initial commit with a base test, gradle change and execution script Signed-off-by: Darshit Chanpura <[email protected]> * Disable JarHell with classpsloading override Signed-off-by: Peter Nied <[email protected]> * Sample certficates for sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test and adds a base class that extends OpenSearchRestTestCase and modifies client builder methods Signed-off-by: Darshit Chanpura <[email protected]> * Adds common-utils dependency and modifies integTestRemote task Signed-off-by: Darshit Chanpura <[email protected]> * Updates integtest script Signed-off-by: Darshit Chanpura <[email protected]> * Makes integtest script executable Signed-off-by: Darshit Chanpura <[email protected]> * Updates code hygiene Signed-off-by: Darshit Chanpura <[email protected]> * Disabling integTest task that was auto-triggered Signed-off-by: Darshit Chanpura <[email protected]> * Fix broken github action for build-artifacts Signed-off-by: Darshit Chanpura <[email protected]> * Updates bwc gradle to skip sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Updates test task to skip sanity test Signed-off-by: Darshit Chanpura <[email protected]> * Code cleanup Signed-off-by: Darshit Chanpura <[email protected]> * Documenting the changes Signed-off-by: Darshit Chanpura <[email protected]> * Updates exclusion filter for build gradle test task Signed-off-by: Darshit Chanpura <[email protected]> * Addresses requested PR changes Signed-off-by: Darshit Chanpura <[email protected]> * Fixes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Adds sanity tests CI check Signed-off-by: Darshit Chanpura <[email protected]> * Hard codes common-utils version to stop CI from failing Signed-off-by: Darshit Chanpura <[email protected]> * Updates TODO comment with tracking issue Signed-off-by: Darshit Chanpura <[email protected]> * Makes common-utils version dynamic and acceptable as input parameter to gradle command Signed-off-by: Darshit Chanpura <[email protected]> * Update bwc build gradle to exclude sanity tests Signed-off-by: Darshit Chanpura <[email protected]> * Hardcodes default common utils version Signed-off-by: Darshit Chanpura <[email protected]> * Uses assertThat Signed-off-by: Darshit Chanpura <[email protected]> * Removes incorrect license headers Signed-off-by: Darshit Chanpura <[email protected]> * Fixes CI errors Signed-off-by: Darshit Chanpura <[email protected]> Co-authored-by: Peter Nied <[email protected]> (cherry picked from commit f7b6fe5) Co-authored-by: Darshit Chanpura <[email protected]>
Description
Adds a new feature as an enhancement to existing test framework, which enables security to run integration tests against a remote cluster
Related Issues:
#1761
Testing
Integration test
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.