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:
parent
9701b226d8
commit
3fede8be3c
|
@ -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
|
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.
|
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
|
==== Other useful arguments
|
||||||
|
|
||||||
- In order to start a node with a different max heap space add: `-Dtests.heap.size=4G`
|
- In order to start a node with a different max heap space add: `-Dtests.heap.size=4G`
|
||||||
|
|
|
@ -61,7 +61,7 @@ class TestClustersPluginFuncTest extends AbstractGradleFuncTest {
|
||||||
buildFile << """
|
buildFile << """
|
||||||
testClusters {
|
testClusters {
|
||||||
myCluster {
|
myCluster {
|
||||||
testDistribution = 'oss'
|
testDistribution = 'archive'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class TestClustersPluginFuncTest extends AbstractGradleFuncTest {
|
||||||
buildFile << """
|
buildFile << """
|
||||||
testClusters {
|
testClusters {
|
||||||
myCluster {
|
myCluster {
|
||||||
testDistribution = 'oss'
|
testDistribution = 'archive'
|
||||||
extraJarFile(file('${someJar().absolutePath}'))
|
extraJarFile(file('${someJar().absolutePath}'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ class DocsTestPlugin implements Plugin<Project> {
|
||||||
project.pluginManager.apply('opensearch.standalone-rest-test')
|
project.pluginManager.apply('opensearch.standalone-rest-test')
|
||||||
project.pluginManager.apply('opensearch.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
|
// The distribution can be configured with -Dtests.distribution on the command line
|
||||||
project.testClusters.integTest.testDistribution = distribution.toUpperCase()
|
project.testClusters.integTest.testDistribution = distribution.toUpperCase()
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ClusterConfiguration {
|
||||||
private final Project project
|
private final Project project
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
String distribution = 'oss'
|
String distribution = 'archive'
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
int numNodes = 1
|
int numNodes = 1
|
||||||
|
|
|
@ -100,7 +100,7 @@ class ClusterFormationTasks {
|
||||||
Configuration currentDistro = project.configurations.create("${prefix}_opensearchDistro")
|
Configuration currentDistro = project.configurations.create("${prefix}_opensearchDistro")
|
||||||
Configuration bwcDistro = project.configurations.create("${prefix}_opensearchBwcDistro")
|
Configuration bwcDistro = project.configurations.create("${prefix}_opensearchBwcDistro")
|
||||||
Configuration bwcPlugins = project.configurations.create("${prefix}_opensearchBwcPlugins")
|
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")
|
throw new Exception("tests.distribution=integ-test-zip is not supported")
|
||||||
}
|
}
|
||||||
configureDistributionDependency(project, config.distribution, currentDistro, VersionProperties.getOpenSearch())
|
configureDistributionDependency(project, config.distribution, currentDistro, VersionProperties.getOpenSearch())
|
||||||
|
|
|
@ -36,5 +36,5 @@ package org.opensearch.gradle.testclusters;
|
||||||
*/
|
*/
|
||||||
public enum TestDistribution {
|
public enum TestDistribution {
|
||||||
INTEG_TEST,
|
INTEG_TEST,
|
||||||
OSS
|
ARCHIVE
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ RestIntegTestTask asyncIntegTest = tasks.create("asyncIntegTest", RestIntegTestT
|
||||||
check.dependsOn(asyncIntegTest)
|
check.dependsOn(asyncIntegTest)
|
||||||
|
|
||||||
testClusters.all {
|
testClusters.all {
|
||||||
testDistribution = 'OSS'
|
testDistribution = 'ARCHIVE'
|
||||||
systemProperty 'opensearch.scripting.update.ctx_in_params', 'false'
|
systemProperty 'opensearch.scripting.update.ctx_in_params', 'false'
|
||||||
setting 'reindex.remote.whitelist', '[ "[::1]:*", "127.0.0.1:*" ]'
|
setting 'reindex.remote.whitelist', '[ "[::1]:*", "127.0.0.1:*" ]'
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ apply plugin: 'opensearch.testclusters'
|
||||||
|
|
||||||
testClusters {
|
testClusters {
|
||||||
runTask {
|
runTask {
|
||||||
testDistribution = System.getProperty('run.distribution', 'oss')
|
testDistribution = 'archive'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ dependencies {
|
||||||
|
|
||||||
testClusters {
|
testClusters {
|
||||||
generateContextCluster {
|
generateContextCluster {
|
||||||
testDistribution = 'OSS'
|
testDistribution = 'ARCHIVE'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
testClusters.all {
|
testClusters.all {
|
||||||
testDistribution = 'oss'
|
testDistribution = 'archive'
|
||||||
}
|
}
|
||||||
|
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
|
@ -16,13 +16,13 @@ subprojects { Project subproj ->
|
||||||
subproj.tasks.withType(RestIntegTestTask) {
|
subproj.tasks.withType(RestIntegTestTask) {
|
||||||
if (subproj.extensions.findByName("${it.name}Cluster")) {
|
if (subproj.extensions.findByName("${it.name}Cluster")) {
|
||||||
subproj.extensions.configure("${it.name}Cluster") { 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 {
|
plugins.withType(TestClustersPlugin).whenPluginAdded {
|
||||||
testClusters.all {
|
testClusters.all {
|
||||||
String configuredTestDistribution = System.getProperty('tests.distribution', 'oss').toUpperCase()
|
String configuredTestDistribution = System.getProperty('tests.distribution', 'archive').toUpperCase()
|
||||||
testDistribution = configuredTestDistribution
|
testDistribution = configuredTestDistribution
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue