From 3a0d88e977e8692379d9dd7026f78c06909de985 Mon Sep 17 00:00:00 2001 From: Subhobrata Dey Date: Wed, 20 Apr 2022 20:27:20 +0000 Subject: [PATCH] Update integTest gradle scripts to run via remote cluster independently Signed-off-by: Subhobrata Dey --- alerting/build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/alerting/build.gradle b/alerting/build.gradle index 3d3ede5c2..368690057 100644 --- a/alerting/build.gradle +++ b/alerting/build.gradle @@ -198,6 +198,31 @@ integTest { } } +task integTestRemote(type: RestIntegTestTask) { + 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 "security", System.getProperty("security") + systemProperty "user", System.getProperty("user") + systemProperty "password", System.getProperty("password") + + if (System.getProperty("tests.rest.cluster") != null) { + filter { + includeTestsMatching "org.opensearch.alerting.resthandler.*IT" + } + } + + if (System.getProperty("https") == null || System.getProperty("https") == "false") { + filter { + excludeTestsMatching "org.opensearch.alerting.resthandler.Secure*IT" + } + } +} +integTestRemote.enabled = System.getProperty("tests.rest.cluster") != null + String bwcVersion = "1.13.1.0" String baseName = "alertingBwcCluster" String bwcFilePath = "src/test/resources/bwc"