@@ -37,6 +37,7 @@ plugins {
37
37
apply plugin : ' opensearch.opensearchplugin'
38
38
apply plugin : ' opensearch.internal-cluster-test'
39
39
apply plugin : ' opensearch.pluginzip'
40
+ apply plugin : ' opensearch.rest-test'
40
41
41
42
repositories {
42
43
mavenLocal()
@@ -147,6 +148,46 @@ tasks.withType(Javadoc).configureEach { Javadoc javadoc ->
147
148
javadoc. options. addStringOption(" -release" , java. targetCompatibility. majorVersion)
148
149
}
149
150
150
- testingConventions. enabled = false
151
151
loggerUsageCheck. enabled = false
152
152
validateNebulaPom. enabled = false
153
+
154
+ sourceSets {
155
+ integTest {
156
+ java {
157
+ srcDirs file(" src/integrationTest/java" )
158
+ }
159
+ compileClasspath + = sourceSets[" main" ]. output + configurations[" testRuntimeClasspath" ]
160
+ runtimeClasspath + = output + compileClasspath
161
+ }
162
+ }
163
+
164
+ tasks. named(" testingConventions" ). configure {
165
+ naming. clear()
166
+ naming {
167
+ Tests {
168
+ baseClass " org.apache.lucene.tests.util.LuceneTestCase"
169
+ }
170
+ IT {
171
+ baseClass " org.opensearch.test.OpenSearchIntegTestCase"
172
+ baseClass " org.opensearch.test.OpenSearchSingleNodeTestCase"
173
+ }
174
+ }
175
+ }
176
+
177
+ integTest {
178
+ description = " Run tests against a cluster"
179
+ testClassesDirs = sourceSets. integTest. output. classesDirs
180
+ classpath = sourceSets. integTest. runtimeClasspath
181
+
182
+ dependsOn " bundlePlugin"
183
+ systemProperty ' tests.security.manager' , ' true'
184
+
185
+ systemProperty " https" , System . getProperty(" https" )
186
+ systemProperty " user" , System . getProperty(" user" )
187
+ systemProperty " password" , System . getProperty(" password" )
188
+ }
189
+
190
+ testClusters. integTest {
191
+ testDistribution = " ARCHIVE"
192
+ plugin(project. tasks. bundlePlugin. archiveFile)
193
+ }
0 commit comments