Skip to content

Commit

Permalink
remove depedency opendistro-sql-1.13.2.0.zip
Browse files Browse the repository at this point in the history
Signed-off-by: penghuo <penghuo@gmail.com>
  • Loading branch information
penghuo committed Mar 25, 2022
1 parent 6771968 commit 0d98b1a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions integ-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask

import java.util.concurrent.Callable


apply plugin: 'opensearch.build'
apply plugin: 'opensearch.rest-test'
apply plugin: 'java'
Expand Down Expand Up @@ -188,6 +189,8 @@ task compileJdbc(type: Exec) {
String bwcVersion = "1.13.2.0";
String baseName = "sqlBwcCluster"
String bwcFilePath = "src/test/resources/bwc/"
String bwcOpenDistroPlugin = "opendistro-sql-1.13.2.0.zip"
String bwcRemoteFile = 'https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-sql/opendistro-sql-1.13.2.0.zip'

2.times { i ->
testClusters {
Expand All @@ -201,6 +204,14 @@ String bwcFilePath = "src/test/resources/bwc/"
return new RegularFile() {
@Override
File getAsFile() {
File dir = new File('./integ-test/' + 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 + bwcVersion).getSingleFile()
}
}
Expand Down
Binary file not shown.

0 comments on commit 0d98b1a

Please sign in to comment.