From 2ed8e697d5ab236e7b270c3d90edade9dac90156 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 29 Jul 2015 21:34:46 -0400 Subject: [PATCH] Add integration tests for distribution/deb --- .../main/resources/ant/integration-tests.xml | 24 +++++++++++ distribution/deb/pom.xml | 43 ++++++++++++++++++- .../org/elasticsearch/test/rest/RestIT.java | 38 ++++++++++++++++ distribution/pom.xml | 4 +- distribution/tar/pom.xml | 3 +- distribution/zip/pom.xml | 2 + pom.xml | 2 +- 7 files changed, 111 insertions(+), 5 deletions(-) create mode 100644 distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index 01e23b2682a..9fd89be6110 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -198,4 +198,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml index f4cfd05efce..226d955b761 100644 --- a/distribution/deb/pom.xml +++ b/distribution/deb/pom.xml @@ -10,11 +10,9 @@ elasticsearch-deb - deb Elasticsearch DEB Distribution - true false dpkg-sig @@ -273,8 +271,49 @@ + + + integ-setup + pre-integration-test + + run + + + ${skip.integ.tests} + + + + + + + + integ-teardown + post-integration-test + + run + + + ${skip.integ.tests} + + + + + + + + + + has_dpkg + + /usr/bin/dpkg-deb + + + true + + + diff --git a/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java b/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java new file mode 100644 index 00000000000..167a5f04f92 --- /dev/null +++ b/distribution/deb/src/test/java/org/elasticsearch/test/rest/RestIT.java @@ -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 parameters() throws IOException, RestTestParseException { + return createParameters(0, 1); + } +} diff --git a/distribution/pom.xml b/distribution/pom.xml index 17671901808..2c68cee7946 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -15,7 +15,6 @@ Elasticsearch Distribution - true /usr/share/elasticsearch /usr/share/elasticsearch/bin @@ -32,6 +31,9 @@ /usr/bin/rpmbuild + + + true diff --git a/distribution/tar/pom.xml b/distribution/tar/pom.xml index e37ac5d2a2b..b14e3534f4e 100644 --- a/distribution/tar/pom.xml +++ b/distribution/tar/pom.xml @@ -13,7 +13,6 @@ Elasticsearch TAR Distribution - false @@ -77,6 +76,7 @@ run + ${skip.integ.tests} @@ -90,6 +90,7 @@ run + ${skip.integ.tests} diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml index fed2d36fecf..a51bb535bcd 100644 --- a/distribution/zip/pom.xml +++ b/distribution/zip/pom.xml @@ -90,6 +90,7 @@ run + ${skip.integ.tests} @@ -103,6 +104,7 @@ run + ${skip.integ.tests} diff --git a/pom.xml b/pom.xml index 21158cdfd88..3b2acf60020 100644 --- a/pom.xml +++ b/pom.xml @@ -1332,7 +1332,7 @@ org.eclipse.jdt.ui.text.custom_code_templates= false - ${basedir}/src + ${basedir}/src/test/java