From 5a35d5899ca45d851fb9dd1373de590e22de6873 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Jul 2024 13:20:59 +0000 Subject: [PATCH] Fix security based integration tests (#59) Signed-off-by: Chenyang Ji (cherry picked from commit c7fb34dc7224ab4f3495beaa7274f46c8087d3af) Signed-off-by: github-actions[bot] --- build.gradle | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index ffe22340..ee0c1b9c 100644 --- a/build.gradle +++ b/build.gradle @@ -259,18 +259,9 @@ integTest { if (System.getProperty("test.debug") != null) { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' } - // NOTE: this IT config discovers only junit5 (jupiter) tests. - // https://github.com/opensearch-project/sql/issues/1974 - filter { - includeTestsMatching 'org.opensearch.plugin.insights.rules.resthandler.top_queries.TopQueriesRestIT' - } - - if (System.getProperty("security.enabled") == "true") { - getClusters().forEach { cluster -> - configureSecurityPlugin(cluster) - } - systemProperty "user", "admin" - systemProperty "password", "admin" + if (System.getProperty("security.enabled") == "true" || System.getProperty("https") == "true") { + // Exclude this IT, because they executed in another task (:integTestWithSecurity) + exclude 'org/opensearch/plugin/insights/rules/resthandler/top_queries/TopQueriesRestIT.class' } } @@ -341,8 +332,6 @@ task integTestWithSecurity(type: RestIntegTestTask) { jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' } - // NOTE: this IT config discovers only junit5 (jupiter) tests. - // https://github.com/opensearch-project/sql/issues/1974 filter { includeTestsMatching 'org.opensearch.plugin.insights.rules.resthandler.top_queries.TopQueriesRestIT' }