From da9e5fee5ab1a8dea4bf8c3d5534eb54c9880a22 Mon Sep 17 00:00:00 2001 From: Subhobrata Dey Date: Thu, 21 Apr 2022 01:49:06 +0000 Subject: [PATCH] Update integTest gradle scripts to run via remote cluster independently Signed-off-by: Subhobrata Dey --- alerting/build.gradle | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/alerting/build.gradle b/alerting/build.gradle index 72b4b827e..5626b96c4 100644 --- a/alerting/build.gradle +++ b/alerting/build.gradle @@ -169,6 +169,8 @@ 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 @@ -176,7 +178,20 @@ task integTestRemote(type: RestIntegTestTask) { 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"