-
Notifications
You must be signed in to change notification settings - Fork 129
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
Adding gradle task for running integ tests in remote cluster #266
Changes from 1 commit
d8fca6c
019586c
107335d
c2cdb94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
import java.util.concurrent.Callable | ||
import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask | ||
import org.opensearch.gradle.test.RestIntegTestTask | ||
|
||
buildscript { | ||
ext { | ||
|
@@ -217,6 +218,18 @@ testClusters.integTest { | |
systemProperty("java.library.path", "$rootDir/jni/release") | ||
} | ||
|
||
task integTestRemote(type: RestIntegTestTask) { | ||
testClassesDirs = sourceSets.test.output.classesDirs | ||
classpath = sourceSets.test.runtimeClasspath | ||
|
||
// Run tests with remote cluster only if rest case is defined | ||
if (System.getProperty("tests.rest.cluster") != null) { | ||
filter { | ||
includeTestsMatching "org.opensearch.knn.*IT" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think, you should add this in the filter to fix the BWC issue which Jack mentioned in review comments There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks Naveen, it's a good point as we need to have multiple external clusters for BWC. For now I've added bwc tests to exclusion matching rule |
||
} | ||
} | ||
} | ||
|
||
// bwcFilePath contains the gradlew assemble binary files of k-NN plugins | ||
String baseName = "knnBwcCluster" | ||
String bwcFilePath = "src/test/resources/org/opensearch/knn/bwc/" | ||
|
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.
shall we include an example with secure cluster (username/password) as well?
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.
Sure, that makes sense. Let me update the guide
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.
Added instructions for secure cluster