Skip to content

Commit c7fb34d

Browse files
authored
Fix security based integration tests (#59)
Signed-off-by: Chenyang Ji <cyji@amazon.com>
1 parent ba2c19a commit c7fb34d

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

build.gradle

+3-14
Original file line numberDiff line numberDiff line change
@@ -260,18 +260,9 @@ integTest {
260260
if (System.getProperty("test.debug") != null) {
261261
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005'
262262
}
263-
// NOTE: this IT config discovers only junit5 (jupiter) tests.
264-
// https://github.com/opensearch-project/sql/issues/1974
265-
filter {
266-
includeTestsMatching 'org.opensearch.plugin.insights.rules.resthandler.top_queries.TopQueriesRestIT'
267-
}
268-
269-
if (System.getProperty("security.enabled") == "true") {
270-
getClusters().forEach { cluster ->
271-
configureSecurityPlugin(cluster)
272-
}
273-
systemProperty "user", "admin"
274-
systemProperty "password", "admin"
263+
if (System.getProperty("security.enabled") == "true" || System.getProperty("https") == "true") {
264+
// Exclude this IT, because they executed in another task (:integTestWithSecurity)
265+
exclude 'org/opensearch/plugin/insights/rules/resthandler/top_queries/TopQueriesRestIT.class'
275266
}
276267
}
277268

@@ -342,8 +333,6 @@ task integTestWithSecurity(type: RestIntegTestTask) {
342333
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005'
343334
}
344335

345-
// NOTE: this IT config discovers only junit5 (jupiter) tests.
346-
// https://github.com/opensearch-project/sql/issues/1974
347336
filter {
348337
includeTestsMatching 'org.opensearch.plugin.insights.rules.resthandler.top_queries.TopQueriesRestIT'
349338
}

0 commit comments

Comments
 (0)