Rename the distribution used in test clusters. (#603)

For test clusters, we are using the archive(zip, tar), so we rename the distribution accordingly.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
Rabi Panda 2021-04-22 14:21:32 -07:00 committed by GitHub
parent 9701b226d8
commit 3fede8be3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 12 additions and 23 deletions

View File

@ -64,17 +64,6 @@ NOTE: If you have imported the project into IntelliJ according to the instructio
link:/DEVELOPER_GUIDE.md#importing-the-project-into-intellij-idea[DEVELOPER_GUIDE.md] then a debug run configuration
named "Debug OpenSearch" will be created for you and configured appropriately.
==== Distribution
By default a node is started with the zip distribution.
In order to start with a different distribution use the `-Drun.distribution` argument.
To for example start the open source distribution:
-------------------------------------
./gradlew run
-------------------------------------
==== Other useful arguments
- In order to start a node with a different max heap space add: `-Dtests.heap.size=4G`

View File

@ -61,7 +61,7 @@ class TestClustersPluginFuncTest extends AbstractGradleFuncTest {
buildFile << """
testClusters {
myCluster {
testDistribution = 'oss'
testDistribution = 'archive'
}
}
@ -87,7 +87,7 @@ class TestClustersPluginFuncTest extends AbstractGradleFuncTest {
buildFile << """
testClusters {
myCluster {
testDistribution = 'oss'
testDistribution = 'archive'
extraJarFile(file('${someJar().absolutePath}'))
}
}

View File

@ -45,7 +45,7 @@ class DocsTestPlugin implements Plugin<Project> {
project.pluginManager.apply('opensearch.standalone-rest-test')
project.pluginManager.apply('opensearch.rest-test')
String distribution = System.getProperty('tests.distribution', 'oss')
String distribution = System.getProperty('tests.distribution', 'archive')
// The distribution can be configured with -Dtests.distribution on the command line
project.testClusters.integTest.testDistribution = distribution.toUpperCase()

View File

@ -39,7 +39,7 @@ class ClusterConfiguration {
private final Project project
@Input
String distribution = 'oss'
String distribution = 'archive'
@Input
int numNodes = 1

View File

@ -100,7 +100,7 @@ class ClusterFormationTasks {
Configuration currentDistro = project.configurations.create("${prefix}_opensearchDistro")
Configuration bwcDistro = project.configurations.create("${prefix}_opensearchBwcDistro")
Configuration bwcPlugins = project.configurations.create("${prefix}_opensearchBwcPlugins")
if (System.getProperty('tests.distribution', 'oss') == 'integ-test-zip') {
if (System.getProperty('tests.distribution', 'archive') == 'integ-test-zip') {
throw new Exception("tests.distribution=integ-test-zip is not supported")
}
configureDistributionDependency(project, config.distribution, currentDistro, VersionProperties.getOpenSearch())

View File

@ -36,5 +36,5 @@ package org.opensearch.gradle.testclusters;
*/
public enum TestDistribution {
INTEG_TEST,
OSS
ARCHIVE
}

View File

@ -90,7 +90,7 @@ RestIntegTestTask asyncIntegTest = tasks.create("asyncIntegTest", RestIntegTestT
check.dependsOn(asyncIntegTest)
testClusters.all {
testDistribution = 'OSS'
testDistribution = 'ARCHIVE'
systemProperty 'opensearch.scripting.update.ctx_in_params', 'false'
setting 'reindex.remote.whitelist', '[ "[::1]:*", "127.0.0.1:*" ]'

View File

@ -33,7 +33,7 @@ apply plugin: 'opensearch.testclusters'
testClusters {
runTask {
testDistribution = System.getProperty('run.distribution', 'oss')
testDistribution = 'archive'
}
}

View File

@ -104,7 +104,7 @@ dependencies {
testClusters {
generateContextCluster {
testDistribution = 'OSS'
testDistribution = 'ARCHIVE'
}
}

View File

@ -44,7 +44,7 @@ dependencies {
}
testClusters.all {
testDistribution = 'oss'
testDistribution = 'archive'
}
test.enabled = false

View File

@ -16,13 +16,13 @@ subprojects { Project subproj ->
subproj.tasks.withType(RestIntegTestTask) {
if (subproj.extensions.findByName("${it.name}Cluster")) {
subproj.extensions.configure("${it.name}Cluster") { cluster ->
cluster.distribution = System.getProperty('tests.distribution', 'oss')
cluster.distribution = System.getProperty('tests.distribution', 'archive')
}
}
}
plugins.withType(TestClustersPlugin).whenPluginAdded {
testClusters.all {
String configuredTestDistribution = System.getProperty('tests.distribution', 'oss').toUpperCase()
String configuredTestDistribution = System.getProperty('tests.distribution', 'archive').toUpperCase()
testDistribution = configuredTestDistribution
}
}