-
Notifications
You must be signed in to change notification settings - Fork 0
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
1713: add multi-cluster IT testing class for Cross-Cluster support #319
1713: add multi-cluster IT testing class for Cross-Cluster support #319
Conversation
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## integ-add-security-plugin-it-1713 #319 +/- ##
====================================================================
Coverage 97.42% 97.42%
Complexity 4647 4647
====================================================================
Files 408 408
Lines 11526 11526
Branches 839 839
====================================================================
Hits 11229 11229
Misses 290 290
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -105,10 +105,10 @@ protected RestClient buildClient(Settings settings, HttpHost[] hosts) throws IOE | |||
} | |||
|
|||
// Modified from initClient in OpenSearchRestTestCase | |||
public void initRemoteClient() throws IOException { | |||
public void initRemoteClient(String clusterName) throws IOException { |
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.
Does this not reduce potential future reuse of this function?
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.
The cluster name is defined in the gradle task. Sean hardcoded the name in a static variable, so this only used to work with the remoteCluster, and now it works with whatever the gradle task has named the cluster.
So... no. I think this is more reusable?
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 you also add a test that checks if https
url works. I think default port when security enabled is 443.
./gradlew :integ-test:integTest || echo "* Integration test failed" >> report.log | ||
./gradlew :integ-test:multiClusterSearch || echo "* Multi-Cluster Search tests failed" >> report.log |
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.
Since this is for every push, can we run it after doctests? For development, doctests are more relevant to us than testing with security enabled.
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.
I thought this was akin to Integration Testing, just against a different cluster. The tests run are integration tests.
I would categorize doctests are more API testing which seems more highlevel... but is just another form of Integration Test.
So... 🤷
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.
Right it's more so when we push and we want to know if all integ test and doctest pass we would have to wait x time for mutlicluster IT to finish (spin up, run tests, and clean up) before getting our results. While the ITs added here are really only relevant for release testing.
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.
This CI runs on demand only
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.
If you want to run these tests in every push/PR, add it to sql-test-and-build-workflow.yml
@@ -301,7 +304,7 @@ integTest { | |||
exclude 'org/opensearch/sql/jdbc/**' | |||
|
|||
// Exclude this IT until running IT with security plugin enabled is ready | |||
exclude 'org/opensearch/sql/ppl/CrossClusterSearchIT.class' | |||
// exclude 'org/opensearch/sql/ppl/CrossClusterSearchIT.class' |
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.
Delete
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.
☝️
Signed-off-by: acarbonetto <andrewc@bitquilltech.com>
@@ -301,7 +304,7 @@ integTest { | |||
exclude 'org/opensearch/sql/jdbc/**' | |||
|
|||
// Exclude this IT until running IT with security plugin enabled is ready | |||
exclude 'org/opensearch/sql/ppl/CrossClusterSearchIT.class' | |||
// exclude 'org/opensearch/sql/ppl/CrossClusterSearchIT.class' |
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.
☝️
./gradlew :integ-test:integTest || echo "* Integration test failed" >> report.log | ||
./gradlew :integ-test:multiClusterSearch || echo "* Multi-Cluster Search tests failed" >> report.log |
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.
If you want to run these tests in every push/PR, add it to sql-test-and-build-workflow.yml
import org.opensearch.client.ResponseException; | ||
import org.opensearch.sql.ppl.PPLIntegTestCase; | ||
|
||
public class CrossClusterSearchIT extends PPLIntegTestCase { |
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.
Probably add a comment describing difference with ppl/CrossClusterSearchIT
systemProperty "https", System.getProperty("https") | ||
systemProperty "user", System.getProperty("user") | ||
systemProperty "password", System.getProperty("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.
This is no-op, can be removed
} | ||
|
||
testClusters { |
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.
} | |
testClusters { |
Description
Adds multiClusterSearch IT test task that creates a 3-node cluster and additional cross-cluster for CrossClusterSearchIT testing, with the Security plugin enabled.
This will bring IT test infrastructure more in-step with the release workflow to avoid security-plugin issues in the future.
Issues Resolved
opensearch-project#1713
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.