Add integ-test-zip distribution
This commit is contained in:
parent
0a4a81afaf
commit
caf77f7eea
|
@ -109,6 +109,7 @@ subprojects {
|
||||||
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
|
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
|
||||||
"org.elasticsearch:elasticsearch:${version}": ':core',
|
"org.elasticsearch:elasticsearch:${version}": ':core',
|
||||||
"org.elasticsearch:test-framework:${version}": ':test-framework',
|
"org.elasticsearch:test-framework:${version}": ':test-framework',
|
||||||
|
"org.elasticsearch.distribution.integ-test-zip:elasticsearch:${version}": ':distribution:integ-test-zip',
|
||||||
"org.elasticsearch.distribution.zip:elasticsearch:${version}": ':distribution:zip',
|
"org.elasticsearch.distribution.zip:elasticsearch:${version}": ':distribution:zip',
|
||||||
"org.elasticsearch.distribution.tar:elasticsearch:${version}": ':distribution:tar',
|
"org.elasticsearch.distribution.tar:elasticsearch:${version}": ':distribution:tar',
|
||||||
"org.elasticsearch.distribution.rpm:elasticsearch:${version}": ':distribution:rpm',
|
"org.elasticsearch.distribution.rpm:elasticsearch:${version}": ':distribution:rpm',
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.gradle.api.tasks.Input
|
||||||
class ClusterConfiguration {
|
class ClusterConfiguration {
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
String distribution = 'zip'
|
String distribution = 'integ-test-zip'
|
||||||
|
|
||||||
@Input
|
@Input
|
||||||
int numNodes = 1
|
int numNodes = 1
|
||||||
|
|
|
@ -60,7 +60,12 @@ class ClusterFormationTasks {
|
||||||
/** Adds a dependency on the given distribution */
|
/** Adds a dependency on the given distribution */
|
||||||
static void configureDistributionDependency(Project project, String distro) {
|
static void configureDistributionDependency(Project project, String distro) {
|
||||||
String elasticsearchVersion = VersionProperties.elasticsearch
|
String elasticsearchVersion = VersionProperties.elasticsearch
|
||||||
String packaging = distro == 'tar' ? 'tar.gz' : distro
|
String packaging = distro
|
||||||
|
if (distro == 'tar') {
|
||||||
|
packaging = 'tar.gz'
|
||||||
|
} else if (distro == 'integ-test-zip') {
|
||||||
|
packaging = 'zip'
|
||||||
|
}
|
||||||
project.configurations {
|
project.configurations {
|
||||||
elasticsearchDistro
|
elasticsearchDistro
|
||||||
}
|
}
|
||||||
|
@ -138,6 +143,7 @@ class ClusterFormationTasks {
|
||||||
by the source tree. If it isn't then Bad Things(TM) will happen. */
|
by the source tree. If it isn't then Bad Things(TM) will happen. */
|
||||||
Task extract
|
Task extract
|
||||||
switch (node.config.distribution) {
|
switch (node.config.distribution) {
|
||||||
|
case 'integ-test-zip':
|
||||||
case 'zip':
|
case 'zip':
|
||||||
extract = project.tasks.create(name: name, type: Copy, dependsOn: extractDependsOn) {
|
extract = project.tasks.create(name: name, type: Copy, dependsOn: extractDependsOn) {
|
||||||
from { project.zipTree(project.configurations.elasticsearchDistro.singleFile) }
|
from { project.zipTree(project.configurations.elasticsearchDistro.singleFile) }
|
||||||
|
|
|
@ -173,6 +173,7 @@ class NodeInfo {
|
||||||
static File homeDir(File baseDir, String distro) {
|
static File homeDir(File baseDir, String distro) {
|
||||||
String path
|
String path
|
||||||
switch (distro) {
|
switch (distro) {
|
||||||
|
case 'integ-test-zip':
|
||||||
case 'zip':
|
case 'zip':
|
||||||
case 'tar':
|
case 'tar':
|
||||||
path = "elasticsearch-${VersionProperties.elasticsearch}"
|
path = "elasticsearch-${VersionProperties.elasticsearch}"
|
||||||
|
@ -188,8 +189,8 @@ class NodeInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
static File confDir(File baseDir, String distro) {
|
static File confDir(File baseDir, String distro) {
|
||||||
String Path
|
|
||||||
switch (distro) {
|
switch (distro) {
|
||||||
|
case 'integ-test-zip':
|
||||||
case 'zip':
|
case 'zip':
|
||||||
case 'tar':
|
case 'tar':
|
||||||
return new File(homeDir(baseDir, distro), 'config')
|
return new File(homeDir(baseDir, distro), 'config')
|
||||||
|
|
|
@ -136,7 +136,7 @@ subprojects {
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Zip and tgz configuration *
|
* Zip and tgz configuration *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
configure(subprojects.findAll { it.name == 'zip' || it.name == 'tar' }) {
|
configure(subprojects.findAll { it.name == 'zip' || it.name == 'tar' || it.name == 'integ-test-zip' }) {
|
||||||
project.ext.archivesFiles = copySpec {
|
project.ext.archivesFiles = copySpec {
|
||||||
into("elasticsearch-${version}") {
|
into("elasticsearch-${version}") {
|
||||||
with libFiles
|
with libFiles
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
task buildZip(type: Zip, dependsOn: dependencyFiles) {
|
task buildZip(type: Zip) {
|
||||||
baseName = 'elasticsearch'
|
baseName = 'elasticsearch'
|
||||||
with archivesFiles
|
with archivesFiles
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Licensed to Elasticsearch under one or more contributor
|
||||||
|
* license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright
|
||||||
|
* ownership. Elasticsearch licenses this file to you under
|
||||||
|
* the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
* not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.elasticsearch.test.rest;
|
||||||
|
|
||||||
|
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||||
|
|
||||||
|
import org.elasticsearch.test.rest.parser.RestTestParseException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/** Rest integration test. runs against external cluster in 'mvn verify' */
|
||||||
|
public class RestIT extends ESRestTestCase {
|
||||||
|
public RestIT(RestTestCandidate testCandidate) {
|
||||||
|
super(testCandidate);
|
||||||
|
}
|
||||||
|
// we run them all sequentially: start simple!
|
||||||
|
@ParametersFactory
|
||||||
|
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
|
||||||
|
return createParameters(0, 1);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ rootProject.name = 'elasticsearch'
|
||||||
List projects = [
|
List projects = [
|
||||||
'rest-api-spec',
|
'rest-api-spec',
|
||||||
'core',
|
'core',
|
||||||
|
'distribution:integ-test-zip',
|
||||||
'distribution:zip',
|
'distribution:zip',
|
||||||
'distribution:tar',
|
'distribution:tar',
|
||||||
'distribution:deb',
|
'distribution:deb',
|
||||||
|
|
Loading…
Reference in New Issue