From 0d71fc2a83ff032644f38cd9578806ba55917c6d Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Wed, 31 Jul 2024 18:40:52 -0700 Subject: [PATCH 1/3] Disabled non-security tests from executing during security-enabled CI workflows. Signed-off-by: AWSHurneyt --- sample-remote-monitor-plugin/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sample-remote-monitor-plugin/build.gradle b/sample-remote-monitor-plugin/build.gradle index e1d38dbea..703c61c87 100644 --- a/sample-remote-monitor-plugin/build.gradle +++ b/sample-remote-monitor-plugin/build.gradle @@ -69,6 +69,12 @@ task integTest(type: RestIntegTestTask) { description = "Run tests against a cluster" testClassesDirs = sourceSets.test.output.classesDirs classpath = sourceSets.test.runtimeClasspath + + if (System.getProperty("https") != null || System.getProperty("https") != "false") { + filter { + excludeTestsMatching "org.opensearch.alerting.SampleRemoteMonitorIT" + } + } } tasks.named("check").configure { dependsOn(integTest) } From 45cfc7748f7b320d9f28285ed817dd26c5a13a9a Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 1 Aug 2024 13:10:25 -0700 Subject: [PATCH 2/3] Disabled non-security tests from executing during security-enabled CI workflows. Signed-off-by: AWSHurneyt --- sample-remote-monitor-plugin/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sample-remote-monitor-plugin/build.gradle b/sample-remote-monitor-plugin/build.gradle index 703c61c87..2a6542c46 100644 --- a/sample-remote-monitor-plugin/build.gradle +++ b/sample-remote-monitor-plugin/build.gradle @@ -70,7 +70,11 @@ task integTest(type: RestIntegTestTask) { testClassesDirs = sourceSets.test.output.classesDirs classpath = sourceSets.test.runtimeClasspath - if (System.getProperty("https") != null || System.getProperty("https") != "false") { + if (System.getProperty("https") == null || System.getProperty("https") == "false") { + filter { + includeTestsMatching '**/*IT.class' + } + } else { filter { excludeTestsMatching "org.opensearch.alerting.SampleRemoteMonitorIT" } From 51ceb78bf8d91558bc0d740e3c328465172da8fa Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Thu, 1 Aug 2024 14:21:55 -0700 Subject: [PATCH 3/3] Disabled non-security tests from executing during security-enabled CI workflows. Signed-off-by: AWSHurneyt --- sample-remote-monitor-plugin/build.gradle | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sample-remote-monitor-plugin/build.gradle b/sample-remote-monitor-plugin/build.gradle index 2a6542c46..03493b915 100644 --- a/sample-remote-monitor-plugin/build.gradle +++ b/sample-remote-monitor-plugin/build.gradle @@ -72,11 +72,7 @@ task integTest(type: RestIntegTestTask) { if (System.getProperty("https") == null || System.getProperty("https") == "false") { filter { - includeTestsMatching '**/*IT.class' - } - } else { - filter { - excludeTestsMatching "org.opensearch.alerting.SampleRemoteMonitorIT" + includeTestsMatching "org.opensearch.alerting.SampleRemoteMonitorIT" } } }