Skip to content

Commit

Permalink
Add bwcBundleTest back
Browse files Browse the repository at this point in the history
Signed-off-by: Angie Zhang <[email protected]>
  • Loading branch information
Angie Zhang committed Mar 30, 2023
1 parent 547617a commit 205f2b4
Showing 1 changed file with 76 additions and 22 deletions.
98 changes: 76 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ task integTestRemote(type: RestIntegTestTask) {

String bwcVersionShort = "2.5.0"
String bwcVersion = bwcVersionShort + ".0"
Boolean bwcBundleTest = (project.findProperty('customDistributionDownloadType') != null &&
project.properties['customDistributionDownloadType'] == "bundle");
String baseName = "indexmanagementBwcCluster"
String bwcFilePath = "src/test/resources/bwc/"
String bwc_js_resource_location = bwcFilePath + "job-scheduler/" + bwcVersion
Expand All @@ -621,35 +623,87 @@ String bwc_js_download_url = 'https://ci.opensearch.org/ci/dbc/distribution-buil
String bwc_im_download_url = 'https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/' + bwcVersionShort + '/latest/linux/x64/tar/builds/' +
'opensearch/plugins/opensearch-index-management-' + bwcVersion + '.zip'

2.times { i ->
2.times {i ->
testClusters {
"${baseName}$i" {
"${baseName}$i"{
testDistribution = "ARCHIVE"
versions = [bwcVersionShort, opensearch_version]
numberOfNodes = 3
plugin(provider(new Callable<RegularFile>() {
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return getPluginResource(bwc_js_resource_location, bwc_js_download_url)
if (bwcBundleTest) {
versions = [
"1.3.2", bwcCurrentVersion
]
nodes.each { node ->
node.extraConfigFile("kirk.pem", file("src/test/resources/security/kirk.pem"))
node.extraConfigFile("kirk-key.pem", file("src/test/resources/security/kirk-key.pem"))
node.extraConfigFile("esnode.pem", file("src/test/resources/security/esnode.pem"))
node.extraConfigFile("esnode-key.pem", file("src/test/resources/security/esnode-key.pem"))
node.extraConfigFile("root-ca.pem", file("src/test/resources/security/root-ca.pem"))
node.setting("plugins.security.disabled",
"true")
node.setting("plugins.security.ssl.transport.pemcert_filepath",
"esnode.pem")
node.setting("plugins.security.ssl.transport.pemkey_filepath",
"esnode-key.pem")
node.setting("plugins.security.ssl.transport.pemtrustedcas_filepath",
"root-ca.pem")
node.setting("plugins.security.ssl.transport.enforce_hostname_verification",
"false")
node.setting("plugins.security.ssl.http.enabled",
"true")
node.setting("plugins.security.ssl.http.pemcert_filepath",
"esnode.pem")
node.setting("plugins.security.ssl.http.pemkey_filepath",
"esnode-key.pem")
node.setting("plugins.security.ssl.http.pemtrustedcas_filepath",
"root-ca.pem")
node.setting("plugins.security.allow_unsafe_democertificates",
"true")
node.setting("plugins.security.allow_default_init_securityindex",
"true")
node.setting("plugins.security.authcz.admin_dn",
"\n - CN=kirk,OU=client,O=client,L=test,C=de")
node.setting("plugins.security.audit.type",
"internal_elasticsearch")
node.setting("plugins.security.enable_snapshot_restore_privilege",
"true")
node.setting("plugins.security.check_snapshot_restore_write_privileges",
"true")
node.setting("plugins.security.restapi.roles_enabled",
"[\"all_access\", \"security_rest_api_access\"]")
node.setting("plugins.security.system_indices.enabled",
"true")
}
} else {
versions = [
"7.10.2", opensearch_version
]
plugin(provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return getPluginResource(bwc_js_resource_location, bwc_js_download_url)
}
}
}
}
}))
plugin(provider(new Callable<RegularFile>() {
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return getPluginResource(bwc_im_resource_location, bwc_im_download_url)
}))

plugin(provider(new Callable<RegularFile>(){
@Override
RegularFile call() throws Exception {
return new RegularFile() {
@Override
File getAsFile() {
return getPluginResource(bwc_im_resource_location, bwc_im_download_url)
}
}
}
}
}))
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
}))
}

setting 'path.repo',
"${buildDir}/cluster/shared/repo/${baseName}"
setting 'http.content_type.required', 'true'
}
}
Expand Down

0 comments on commit 205f2b4

Please sign in to comment.