Skip to content

Commit

Permalink
Remove zips used by bwc tests
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
  • Loading branch information
bharath-techie committed Apr 19, 2022
1 parent 0a7f805 commit df8e6c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ task integTestRemote(type: RestIntegTestTask) {
}

String baseName = "asynSearchCluster"
String bwcVersion = "1.13.0.1"
String bwcFilePath = "src/test/resources/org/opensearch/search/asynchronous/bwc/"
String bwcRemoteFile = "https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/asynchronous-search/opendistro-asynchronous-search-1.13.0.1.zip"
String bwcOpenDistroPlugin = "opendistro-asynchronous-search-1.13.0.1.zip"

// Creates two test clusters of previous version and loads opensearch plugin of bwcVersion
2.times { i ->
Expand All @@ -228,6 +231,14 @@ String bwcFilePath = "src/test/resources/org/opensearch/search/asynchronous/bwc/
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File(bwcFilePath + bwcVersion)
if (!dir.exists()) {
dir.mkdirs()
}
File f = new File(bwcOpenDistroPlugin, dir)
if (!f.exists()) {
new URL(bwcRemoteFile).withInputStream{ ins -> f.withOutputStream{ it << ins }}
}
return fileTree(bwcFilePath + opendistro_plugin_version).getSingleFile()
}
}
Expand Down
Binary file not shown.

0 comments on commit df8e6c7

Please sign in to comment.