From f0e02fd0203178b2f2125c7f2991bbd5cf558cd4 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 9 Jul 2015 00:40:11 -0400 Subject: [PATCH 1/2] Add integration test phase to watcher build. Integration tests unzip elasticsearch.zip, install the license and watcher plugins with bin/plugin, starts up es with bin/elasticsearch, runs rest tests, then shuts down es. They are run during `mvn verify` phase. Original commit: elastic/x-pack-elasticsearch@f75a036fe5307018e4e379581e40e7eabe476ea8 --- dev-tools/integration-tests.xml | 46 +++++++++++++++++++ pom.xml | 12 ++++- .../watcher/test/rest/WatcherRestIT.java | 21 +++++++++ 3 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 dev-tools/integration-tests.xml create mode 100644 src/test/java/org/elasticsearch/watcher/test/rest/WatcherRestIT.java diff --git a/dev-tools/integration-tests.xml b/dev-tools/integration-tests.xml new file mode 100644 index 00000000000..9787e23d5b4 --- /dev/null +++ b/dev-tools/integration-tests.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + Installing license plugin... + + + + + + Installing plugin ${project.artifactId}... + + + + Starting up external cluster... + + + + + + + + External cluster started PID ${integ.pid} + + diff --git a/pom.xml b/pom.xml index d15a7d4d7e3..55e358ba380 100644 --- a/pom.xml +++ b/pom.xml @@ -16,13 +16,15 @@ - org.elasticsearch + org.elasticsearch.plugin elasticsearch-plugin 2.0.0-SNAPSHOT + dev-tools/elasticsearch_license_header.txt dev-tools/license_header_definition.xml + dev-tools/integration-tests.xml 2.0.0-SNAPSHOT 2.0.0-SNAPSHOT false @@ -87,6 +89,14 @@ test + + org.elasticsearch + elasticsearch-license-plugin + ${license.plugin.version} + zip + test + + com.github.spullara.mustache.java diff --git a/src/test/java/org/elasticsearch/watcher/test/rest/WatcherRestIT.java b/src/test/java/org/elasticsearch/watcher/test/rest/WatcherRestIT.java new file mode 100644 index 00000000000..9e282ddef54 --- /dev/null +++ b/src/test/java/org/elasticsearch/watcher/test/rest/WatcherRestIT.java @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +package org.elasticsearch.watcher.test.rest; + +import org.elasticsearch.test.rest.RestTestCandidate; + +/** Runs rest tests against external cluster */ +public class WatcherRestIT extends WatcherRestTests { + + public WatcherRestIT(RestTestCandidate testCandidate) { + super(testCandidate); + } + + @Override + protected boolean enableShield() { + return false; + } +} From 7afd454663c8e969eae42de19935693b4a3dbc5d Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 9 Jul 2015 01:18:31 -0400 Subject: [PATCH 2/2] adapt to bin/plugin changes for es plugins Original commit: elastic/x-pack-elasticsearch@1a43ef87e05f7c296b08e5212abc7a09d55eaf5c --- dev-tools/integration-tests.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-tools/integration-tests.xml b/dev-tools/integration-tests.xml index 9787e23d5b4..ad09092e52f 100644 --- a/dev-tools/integration-tests.xml +++ b/dev-tools/integration-tests.xml @@ -22,14 +22,14 @@ Installing license plugin... + args="-u ${integ.license.plugin.url} -i elasticsearch-license-plugin"/> Installing plugin ${project.artifactId}... + args="-u ${integ.plugin.url} -i ${project.artifactId}"/> Starting up external cluster...