Add integration tests for distribution/deb
This commit is contained in:
parent
1c5a558164
commit
2ed8e697d5
|
@ -198,4 +198,28 @@
|
||||||
<startup-elasticsearch/>
|
<startup-elasticsearch/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<!-- distribution tests: .deb -->
|
||||||
|
|
||||||
|
<target name="setup-workspace-deb" depends="stop-external-cluster" unless="${shouldskip}">
|
||||||
|
<sequential>
|
||||||
|
<delete dir="${integ.scratch}"/>
|
||||||
|
<mkdir dir="${integ.scratch}/deb-extracted"/>
|
||||||
|
<local name="debfile"/>
|
||||||
|
<property name="debfile" location="${project.build.directory}/releases/elasticsearch-${project.version}.deb"/>
|
||||||
|
<exec executable="dpkg-deb" failonerror="true" taskname="deb-info">
|
||||||
|
<arg value="-W"/>
|
||||||
|
<arg value="${debfile}"/>
|
||||||
|
</exec>
|
||||||
|
<exec executable="dpkg-deb" failonerror="true">
|
||||||
|
<arg value="-x"/>
|
||||||
|
<arg value="${debfile}"/>
|
||||||
|
<arg value="${integ.scratch}/deb-extracted"/>
|
||||||
|
</exec>
|
||||||
|
</sequential>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="start-external-cluster-deb" depends="setup-workspace-deb" unless="${shouldskip}">
|
||||||
|
<startup-elasticsearch home="${integ.scratch}/deb-extracted/usr/share/elasticsearch/"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -10,11 +10,9 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>elasticsearch-deb</artifactId>
|
<artifactId>elasticsearch-deb</artifactId>
|
||||||
<packaging>deb</packaging>
|
|
||||||
<name>Elasticsearch DEB Distribution</name>
|
<name>Elasticsearch DEB Distribution</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<skip.integ.tests>true</skip.integ.tests>
|
|
||||||
<deb.sign>false</deb.sign>
|
<deb.sign>false</deb.sign>
|
||||||
<deb.sign.method>dpkg-sig</deb.sign.method>
|
<deb.sign.method>dpkg-sig</deb.sign.method>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -273,8 +271,49 @@
|
||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<!-- start up external cluster -->
|
||||||
|
<execution>
|
||||||
|
<id>integ-setup</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<skip>${skip.integ.tests}</skip>
|
||||||
|
<target>
|
||||||
|
<ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster-deb"/>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
<!-- shut down external cluster -->
|
||||||
|
<execution>
|
||||||
|
<id>integ-teardown</id>
|
||||||
|
<phase>post-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<skip>${skip.integ.tests}</skip>
|
||||||
|
<target>
|
||||||
|
<ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<!-- we run integration test with real dpkg utils, you must have them -->
|
||||||
|
<profile>
|
||||||
|
<id>has_dpkg</id>
|
||||||
|
<activation>
|
||||||
|
<file><missing>/usr/bin/dpkg-deb</missing></file>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<skip.integ.tests>true</skip.integ.tests>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -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 ElasticsearchRestTestCase {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,6 @@
|
||||||
<name>Elasticsearch Distribution</name>
|
<name>Elasticsearch Distribution</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<skipTests>true</skipTests>
|
|
||||||
<!-- Properties used for building RPM & DEB packages (see common/packaging.properties) -->
|
<!-- Properties used for building RPM & DEB packages (see common/packaging.properties) -->
|
||||||
<packaging.elasticsearch.home.dir>/usr/share/elasticsearch</packaging.elasticsearch.home.dir>
|
<packaging.elasticsearch.home.dir>/usr/share/elasticsearch</packaging.elasticsearch.home.dir>
|
||||||
<packaging.elasticsearch.bin.dir>/usr/share/elasticsearch/bin</packaging.elasticsearch.bin.dir>
|
<packaging.elasticsearch.bin.dir>/usr/share/elasticsearch/bin</packaging.elasticsearch.bin.dir>
|
||||||
|
@ -32,6 +31,9 @@
|
||||||
|
|
||||||
<!-- rpmbuild location : default to /usr/bin/rpmbuild -->
|
<!-- rpmbuild location : default to /usr/bin/rpmbuild -->
|
||||||
<packaging.rpm.rpmbuild>/usr/bin/rpmbuild</packaging.rpm.rpmbuild>
|
<packaging.rpm.rpmbuild>/usr/bin/rpmbuild</packaging.rpm.rpmbuild>
|
||||||
|
|
||||||
|
<!-- we expect packaging formats to have integration tests, but not unit tests -->
|
||||||
|
<skip.unit.tests>true</skip.unit.tests>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<name>Elasticsearch TAR Distribution</name>
|
<name>Elasticsearch TAR Distribution</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<skip.integ.tests>false</skip.integ.tests>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -77,6 +76,7 @@
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<skip>${skip.integ.tests}</skip>
|
||||||
<target>
|
<target>
|
||||||
<ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster-tar"/>
|
<ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster-tar"/>
|
||||||
</target>
|
</target>
|
||||||
|
@ -90,6 +90,7 @@
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<skip>${skip.integ.tests}</skip>
|
||||||
<target>
|
<target>
|
||||||
<ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
|
<ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
|
@ -90,6 +90,7 @@
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<skip>${skip.integ.tests}</skip>
|
||||||
<target>
|
<target>
|
||||||
<ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster"/>
|
<ant antfile="${elasticsearch.integ.antfile}" target="start-external-cluster"/>
|
||||||
</target>
|
</target>
|
||||||
|
@ -103,6 +104,7 @@
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
|
<skip>${skip.integ.tests}</skip>
|
||||||
<target>
|
<target>
|
||||||
<ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
|
<ant antfile="${elasticsearch.integ.antfile}" target="stop-external-cluster"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -1332,7 +1332,7 @@ org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UT
|
||||||
<activation>
|
<activation>
|
||||||
<activeByDefault>false</activeByDefault>
|
<activeByDefault>false</activeByDefault>
|
||||||
<file>
|
<file>
|
||||||
<missing>${basedir}/src</missing>
|
<missing>${basedir}/src/test/java</missing>
|
||||||
</file>
|
</file>
|
||||||
</activation>
|
</activation>
|
||||||
<properties>
|
<properties>
|
||||||
|
|
Loading…
Reference in New Issue