Skip to content

Commit

Permalink
Use separate targets for security enabled tests (#113)
Browse files Browse the repository at this point in the history
Signed-off-by: Chenyang Ji <[email protected]>
  • Loading branch information
ansjcy authored Sep 10, 2024
1 parent 4d896cc commit 839e6f7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ integTest {
jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005'
}
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'
exclude 'org/opensearch/plugin/insights/core/exporter/QueryInsightsExporterIT.class'
// Exclude the ITs when security is enabled, because they executed in another task (:integTestWithSecurity)
exclude 'org/opensearch/plugin/insights/**/*IT.class'
}
}

Expand Down Expand Up @@ -345,7 +344,7 @@ task integTestWithSecurity(type: RestIntegTestTask) {
}

filter {
includeTestsMatching 'org.opensearch.plugin.insights.rules.resthandler.top_queries.TopQueriesRestIT'
includeTestsMatching 'org.opensearch.plugin.insights.*IT'
}
}

Expand Down

0 comments on commit 839e6f7

Please sign in to comment.