|
| 1 | +import java.util.concurrent.Callable |
| 2 | + |
1 | 3 | /* |
2 | 4 | * Copyright OpenSearch Contributors |
3 | 5 | * SPDX-License-Identifier: Apache-2.0 |
@@ -114,6 +116,11 @@ configurations.all { |
114 | 116 | resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10" |
115 | 117 | resolutionStrategy.force "org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10" |
116 | 118 | } |
| 119 | + |
| 120 | +configurations { |
| 121 | + zipArchive |
| 122 | +} |
| 123 | + |
117 | 124 | compileJava { |
118 | 125 | options.compilerArgs.addAll(["-processor", 'lombok.launch.AnnotationProcessorHider$AnnotationProcessor']) |
119 | 126 | } |
@@ -162,6 +169,8 @@ dependencies { |
162 | 169 | testImplementation group: 'org.mockito', name: 'mockito-core', version: "${versions.mockito}" |
163 | 170 | testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: "${versions.mockito}" |
164 | 171 | testImplementation 'org.junit.jupiter:junit-jupiter:5.9.3' |
| 172 | + |
| 173 | + zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}" |
165 | 174 | } |
166 | 175 |
|
167 | 176 | test { |
@@ -276,7 +285,24 @@ afterEvaluate { |
276 | 285 | } |
277 | 286 | } |
278 | 287 |
|
| 288 | +def getJobSchedulerPlugin() { |
| 289 | + provider(new Callable<RegularFile>() { |
| 290 | + @Override |
| 291 | + RegularFile call() throws Exception { |
| 292 | + return new RegularFile() { |
| 293 | + @Override |
| 294 | + File getAsFile() { |
| 295 | + return configurations.zipArchive.asFileTree.matching { |
| 296 | + include '**/opensearch-job-scheduler*' |
| 297 | + }.singleFile |
| 298 | + } |
| 299 | + } |
| 300 | + } |
| 301 | + }) |
| 302 | +} |
| 303 | + |
279 | 304 | testClusters.integTest { |
| 305 | + plugin(getJobSchedulerPlugin()) |
280 | 306 | plugin(project.tasks.bundlePlugin.archiveFile) |
281 | 307 | testDistribution = "ARCHIVE" |
282 | 308 |
|
|
0 commit comments