Skip to content

Commit

Permalink
Fix bwc test
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chu <clingzhi@amazon.com>
  • Loading branch information
noCharger committed Jul 24, 2024
1 parent 4fea614 commit b8a586e
Showing 1 changed file with 30 additions and 45 deletions.
75 changes: 30 additions & 45 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -223,62 +223,42 @@ testClusters.all {
}
}

testClusters {
integTest {
testDistribution = 'archive'
plugin(provider({
new RegularFile() {
def getJobSchedulerPlugin() {
provider(new Callable<RegularFile>() {
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile
}
}
}))
}
})
}

testClusters {
integTest {
testDistribution = 'archive'
plugin(getJobSchedulerPlugin())
plugin ":opensearch-sql-plugin"
setting "plugins.query.datasources.encryption.masterkey", "1234567812345678"
}
remoteCluster {
testDistribution = 'archive'
plugin(provider({
new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile
}
}
}))
plugin(getJobSchedulerPlugin())
plugin ":opensearch-sql-plugin"
}
integTestWithSecurity {
testDistribution = 'archive'
plugin(provider({
new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile
}
}
}))
plugin(getJobSchedulerPlugin())
plugin ":opensearch-sql-plugin"
}
remoteIntegTestWithSecurity {
testDistribution = 'archive'
plugin(provider({
new RegularFile() {
@Override
File getAsFile() {
return configurations.zipArchive.asFileTree.matching {
include '**/opensearch-job-scheduler*'
}.singleFile
}
}
}))
plugin(getJobSchedulerPlugin())
plugin ":opensearch-sql-plugin"
}
}
Expand Down Expand Up @@ -584,17 +564,18 @@ task comparisonTest(type: RestIntegTestTask) {
}

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

// Creates 2 test clusters with 3 nodes of the old version.
Expand All @@ -619,6 +600,7 @@ task "${baseName}#mixedClusterTask"(type: StandaloneRestIntegTestTask) {
useCluster testClusters."${baseName}0"
dependsOn "${baseName}#oldVersionClusterTask0"
doFirst {
println "List of plugins: $plugins"
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
}
filter {
Expand All @@ -638,6 +620,7 @@ task "${baseName}#twoThirdsUpgradedClusterTask"(type: StandaloneRestIntegTestTas
dependsOn "${baseName}#mixedClusterTask"
useCluster testClusters."${baseName}0"
doFirst {
println "List of plugins: $plugins"
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
}
filter {
Expand All @@ -657,6 +640,7 @@ task "${baseName}#rollingUpgradeClusterTask"(type: StandaloneRestIntegTestTask)
dependsOn "${baseName}#twoThirdsUpgradedClusterTask"
useCluster testClusters."${baseName}0"
doFirst {
println "List of plugins: $plugins"
testClusters."${baseName}0".upgradeNodeAndPluginToNextVersion(plugins)
}
filter {
Expand All @@ -676,6 +660,7 @@ task "${baseName}#fullRestartClusterTask"(type: StandaloneRestIntegTestTask) {
dependsOn "${baseName}#oldVersionClusterTask1"
useCluster testClusters."${baseName}1"
doFirst {
println "List of plugins: $plugins"
testClusters."${baseName}1".upgradeAllNodesAndPluginsToNextVersion(plugins)
}
filter {
Expand Down

0 comments on commit b8a586e

Please sign in to comment.