@@ -163,8 +163,8 @@ test {
163
163
File repo = file(" $buildDir /testclusters/repo" )
164
164
def _numNodes = findProperty(' numNodes' ) as Integer ?: 1
165
165
166
- def es_tmp_dir = rootProject. file(' build/private/es_tmp' ). absoluteFile
167
- es_tmp_dir . mkdirs()
166
+ def opensearch_tmp_dir = rootProject. file(' build/private/es_tmp' ). absoluteFile
167
+ opensearch_tmp_dir . mkdirs()
168
168
169
169
// As of ES 7.7 the sample-extension-plugin is being added to the list of plugins for the testCluster during build before
170
170
// the job-scheduler plugin is causing build failures.
@@ -185,15 +185,16 @@ tasks.withType(licenseHeaders.class) {
185
185
}
186
186
187
187
task integTest (type : RestIntegTestTask ) {
188
- description = " Run tests against a cluster that has security enabled "
188
+ description = " Run tests against a cluster"
189
189
testClassesDirs = sourceSets. test. output. classesDirs
190
190
classpath = sourceSets. test. runtimeClasspath
191
191
}
192
192
tasks. named(" check" ). configure { dependsOn(integTest) }
193
193
194
194
integTest {
195
+ dependsOn " bundlePlugin"
195
196
systemProperty ' tests.security.manager' , ' false'
196
- systemProperty ' java.io.tmpdir' , es_tmp_dir . absolutePath
197
+ systemProperty ' java.io.tmpdir' , opensearch_tmp_dir . absolutePath
197
198
198
199
systemProperty " https" , System . getProperty(" https" )
199
200
systemProperty " user" , System . getProperty(" user" )
@@ -224,6 +225,8 @@ integTest {
224
225
}
225
226
}
226
227
228
+
229
+
227
230
Zip bundle = (Zip ) project. getTasks(). getByName(" bundlePlugin" );
228
231
integTest. dependsOn(bundle)
229
232
integTest. getClusters(). forEach {c -> c. plugin(project. getObjects(). fileProperty(). value(bundle. getArchiveFile()))}
@@ -257,6 +260,24 @@ testClusters.integTest {
257
260
setting ' path.repo' , repo. absolutePath
258
261
}
259
262
263
+ task integTestRemote (type : RestIntegTestTask ) {
264
+ testClassesDirs = sourceSets. test. output. classesDirs
265
+ classpath = sourceSets. test. runtimeClasspath
266
+ systemProperty ' tests.security.manager' , ' false'
267
+ systemProperty ' java.io.tmpdir' , opensearch_tmp_dir. absolutePath
268
+
269
+ systemProperty " https" , System . getProperty(" https" )
270
+ systemProperty " user" , System . getProperty(" user" )
271
+ systemProperty " password" , System . getProperty(" password" )
272
+
273
+ // Only rest case can run with remote cluster
274
+ if (System . getProperty(" tests.rest.cluster" ) != null ) {
275
+ filter {
276
+ includeTestsMatching " org.opensearch.reportsscheduler.rest.*IT"
277
+ }
278
+ }
279
+ }
280
+
260
281
run {
261
282
doFirst {
262
283
// There seems to be an issue when running multi node run or integ tasks with unicast_hosts
0 commit comments