@@ -165,6 +165,9 @@ dependencies {
165
165
testImplementation " org.opensearch:opensearch-core:${ opensearch_version} "
166
166
testRuntimeOnly(" org.junit.platform:junit-platform-launcher:1.11.2" )
167
167
testCompileOnly ' junit:junit:4.13.2'
168
+
169
+ opensearchPlugin " org.opensearch.plugin:opensearch-job-scheduler:${ opensearch_build} @zip"
170
+ opensearchPlugin " org.opensearch.plugin:opensearch-security:${ opensearch_build} @zip"
168
171
}
169
172
170
173
apply plugin : ' java'
@@ -410,6 +413,26 @@ integTest {
410
413
}
411
414
}
412
415
416
+ ext. resolvePluginFile = { pluginId ->
417
+ return new Callable<RegularFile > () {
418
+ @Override
419
+ RegularFile call () throws Exception {
420
+ return new RegularFile () {
421
+ @Override
422
+ File getAsFile () {
423
+ return configurations. opensearchPlugin. resolvedConfiguration. resolvedArtifacts
424
+ .find { ResolvedArtifact f ->
425
+ f. name. startsWith(pluginId)
426
+ }
427
+ .file
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+ def jobSchedulerFile = resolvePluginFile(" opensearch-job-scheduler" )
434
+ def securityPluginFile = resolvePluginFile(" opensearch-security" )
435
+
413
436
// === Setup security test ===
414
437
// This flag indicates the existence of security plugin
415
438
def securityEnabled = System . getProperty(" security" , " false" ) == " true" || System . getProperty(" https" , " false" ) == " true"
@@ -439,6 +462,10 @@ testClusters.integTest {
439
462
}
440
463
}
441
464
}))
465
+ plugin(provider(jobSchedulerFile))
466
+ if (securityEnabled) {
467
+ plugin(provider(securityPluginFile))
468
+ }
442
469
443
470
// As of ES 7.7.0 the opendistro-anomaly-detection plugin is being added to the list of plugins for the testCluster during build before
444
471
// the opensearch-job-scheduler plugin, which is causing build failures. From the stack trace, this looks like a bug.
0 commit comments