Skip to content

Commit befb520

Browse files
ps48joshuali925
authored andcommitted
Add Bwc Test for OS 1.1 (opensearch-project#417)
Signed-off-by: Shenoy Pratik <[email protected]>
1 parent 64bb6b9 commit befb520

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.github/workflows/reports-scheduler-test-and-build-workflow.yml

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ jobs:
2525
- name: Checkout Reports Scheduler
2626
uses: actions/checkout@v2
2727

28+
- name: RunBackwards Compatibility Tests
29+
run: |
30+
cd reports-scheduler
31+
echo "Running backwards compatibility tests ..."
32+
./gradlew bwcTestSuite
33+
2834
- name: Build with Gradle
2935
run: |
3036
cd reports-scheduler

reports-scheduler/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,18 @@ testClusters.integTest {
280280
setting 'path.repo', repo.absolutePath
281281
}
282282

283-
// For job-scheduler and reports-scheduler, the latest opendistro releases appear to be 1.13.0.0.
284-
String bwcVersion = "1.13.0.0"
283+
// For job-scheduler and reports-scheduler, the latest opensearch releases appear to be 1.1.0.0.
284+
String bwcVersion = "1.1.0.0"
285285
String baseName = "reportsSchedulerBwcCluster"
286286
String bwcFilePath = "src/test/resources/bwc"
287-
String bwcJobSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-job-scheduler/opendistro-job-scheduler-" + bwcVersion + ".zip"
288-
String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-reports-scheduler/opendistro-reports-scheduler-" + bwcVersion + ".zip"
287+
String bwcJobSchedulerURL = "https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/opensearch-job-scheduler-1.1.0.0.zip"
288+
String bwcReportsSchedulerURL = "https://ci.opensearch.org/ci/dbc/bundle-build/1.1.0/20210930/linux/x64/builds/opensearch/plugins/opensearch-reports-scheduler-1.1.0.0.zip"
289289

290290
2.times {i ->
291291
testClusters {
292292
"${baseName}$i" {
293293
testDistribution = "ARCHIVE"
294-
versions = ["7.10.2", opensearch_version]
294+
versions = ["1.1.0", opensearch_version]
295295
numberOfNodes = 3
296296
plugin(provider(new Callable<RegularFile>(){
297297
@Override
@@ -303,7 +303,7 @@ String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads
303303
if (!dir.exists()) {
304304
dir.mkdirs()
305305
}
306-
File file = new File(dir, "opendistro-job-scheduler-" + bwcVersion + ".zip")
306+
File file = new File(dir, "opensearch-job-scheduler-" + bwcVersion + ".zip")
307307
if (!file.exists()) {
308308
new URL(bwcJobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
309309
}
@@ -322,7 +322,7 @@ String bwcReportsSchedulerURL = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads
322322
if (!dir.exists()) {
323323
dir.mkdirs()
324324
}
325-
File file = new File(dir, "opendistro-reports-scheduler-" + bwcVersion + ".zip")
325+
File file = new File(dir, "opensearch-reports-scheduler-" + bwcVersion + ".zip")
326326
if (!file.exists()) {
327327
new URL(bwcReportsSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
328328
}
@@ -354,7 +354,7 @@ task prepareBwcTests {
354354
if (!dir.exists()) {
355355
dir.mkdirs()
356356
}
357-
File file = new File(dir, "opendistro-reports-scheduler-" + project.version + ".zip")
357+
File file = new File(dir, "opensearch-reports-scheduler-" + project.version + ".zip")
358358
if (!file.exists()) {
359359
new URL(jobSchedulerURL).withInputStream{ ins -> file.withOutputStream{ it << ins }}
360360
}

reports-scheduler/src/test/kotlin/org/opensearch/integTest/bwc/ReportsSchedulerBackwardsCompatibilityIT.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class ReportsSchedulerBackwardsCompatibilityIT : PluginRestTestCase() {
5050
val pluginNames = plugins.map { plugin -> plugin["name"] }.toSet()
5151
when (CLUSTER_TYPE) {
5252
ClusterType.OLD -> {
53-
assertTrue(pluginNames.contains("opendistro-reports-scheduler"))
54-
assertTrue(pluginNames.contains("opendistro-job-scheduler"))
53+
assertTrue(pluginNames.contains("opensearch-reports-scheduler"))
54+
assertTrue(pluginNames.contains("opensearch-job-scheduler"))
5555
createBasicReportDefinition()
5656
}
5757
ClusterType.MIXED -> {

0 commit comments

Comments
 (0)