Skip to content

Commit

Permalink
Updates integTest gradle scripts to run via remote cluster independen…
Browse files Browse the repository at this point in the history
…tly (#160)

Signed-off-by: sruti1312 <srutiparthiban@gmail.com>
  • Loading branch information
sruti1312 committed Mar 12, 2022
1 parent c653904 commit 71e0fc9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ To build from the command line, use `./gradlew`.
`./gradlew paBwcCluster#rollingUpgradeClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with performance-analyzer and tests backwards compatibility by performing rolling upgrade of each node with the current version of OpenSearch with performance-analyzer.
`./gradlew paBwcCluster#fullRestartClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with performance-analyzer and tests backwards compatibility by performing a full restart on the cluster upgrading all the nodes with the current version of OpenSearch with performance-analyzer.
`./gradlew bwcTestSuite -Dtests.security.manager=false` runs all the above bwc tests combined.
`./gradlew integTestRemote -Dtests.enableIT -Dtests.useDockerCluster -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin` launches integration tests against a local cluster and run tests with security

### Using IntelliJ IDEA

Expand Down
25 changes: 25 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,31 @@ task integTest(type: RestIntegTestTask) {
classpath = sourceSets.test.runtimeClasspath
}

def opensearch_tmp_dir = rootProject.file('build/private/opensearch_tmp').absoluteFile
opensearch_tmp_dir.mkdirs()

task integTestRemote(type: RestIntegTestTask) {
onlyIf = {
propEnabled("tests.enableIT")
}
if (System.getProperty("tests.rest.bwcsuite") == null) {
filter {
excludeTestsMatching "org.opensearch.performanceanalyzer.bwc.*IT"
}
}
if (propEnabled("tests.useDockerCluster")) {
dependsOn(setupOpenSearchCluster)
}
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
systemProperty 'tests.security.manager', 'false'
systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath

systemProperty "https", System.getProperty("https")
systemProperty "user", System.getProperty("user")
systemProperty "password", System.getProperty("password")
}

String bwcVersion = "1.13.0.0"
String baseName = "paBwcCluster"
String bwcFilePath = "src/test/resources/org/opensearch/performanceanalyzer/bwc/"
Expand Down

0 comments on commit 71e0fc9

Please sign in to comment.