Skip to content

Commit

Permalink
Simplifier provider
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Kwok <[email protected]>
  • Loading branch information
andy-k-improving committed Jan 10, 2025
1 parent 5e88246 commit ae10342
Showing 1 changed file with 15 additions and 27 deletions.
42 changes: 15 additions & 27 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,10 @@ testClusters.all {
}

def getJobSchedulerPlugin() {
provider { new RegularFile() {
@Override
File getAsFile() {
configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile}
}
provider { (RegularFile) (() ->
configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile )
}
}

Expand Down Expand Up @@ -590,27 +587,22 @@ task comparisonTest(type: RestIntegTestTask) {
testDistribution = "ARCHIVE"
versions = [baseVersion, opensearch_version]
numberOfNodes = 3
plugin(provider { new RegularFile() {
@Override
File getAsFile() {
plugin(provider { (RegularFile) ({
if (new File("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion").exists()) {
project.delete(files("$project.rootDir/$bwcFilePath/job-scheduler/$bwcVersion"))
}
project.mkdir bwcJobSchedulerPath + bwcVersion
ant.get(src: bwcOpenSearchJSDownload,
dest: bwcJobSchedulerPath + bwcVersion,
httpusecaches: false)
return fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
}
}})
plugin(provider { new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-sql-plugin*'
}.singleFile
}
}})
fileTree(bwcJobSchedulerPath + bwcVersion).getSingleFile()
})
})
plugin(provider { (RegularFile) (
configurations.zipArchive.asFileTree.matching {
include '**/opensearch-sql-plugin*'
}.singleFile )
})
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
setting 'http.content_type.required', 'true'
}
Expand All @@ -619,12 +611,8 @@ task comparisonTest(type: RestIntegTestTask) {

List<Provider<RegularFile>> plugins = [
getJobSchedulerPlugin(),
provider{ new RegularFile() {
@Override
File getAsFile() {
return fileTree(bwcFilePath + project.version).getSingleFile()
}
}
provider{ (RegularFile) (
fileTree(bwcFilePath + project.version).getSingleFile())
}
]

Expand Down

0 comments on commit ae10342

Please sign in to comment.