Merge pull request elastic/elasticsearch#646 from rmuir/integ_testing
Add integration test phase to watcher build. Original commit: elastic/x-pack-elasticsearch@44eefe5047
This commit is contained in:
commit
36f5bbd232
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0"?>
|
||||
<project name="commercial-integration-tests">
|
||||
|
||||
<import file="${elasticsearch.integ.antfile.default}"/>
|
||||
|
||||
<!-- unzip core release artifact, install license plugin, install plugin, then start ES -->
|
||||
<target name="start-external-cluster-with-plugin" depends="stop-external-cluster" unless="${shouldskip}">
|
||||
<local name="integ.home"/>
|
||||
<local name="integ.repo.home"/>
|
||||
<local name="integ.plugin.url"/>
|
||||
<local name="integ.pid"/>
|
||||
|
||||
<delete dir="${integ.scratch}"/>
|
||||
<unzip src="${org.elasticsearch:elasticsearch:zip}"
|
||||
dest="${integ.scratch}"/>
|
||||
|
||||
<property name="integ.home" location="${integ.scratch}/elasticsearch-${elasticsearch.version}"/>
|
||||
<property name="integ.repo.home" location="${integ.home}/repo"/>
|
||||
|
||||
<!-- begin commercial plugin mods -->
|
||||
<local name="integ.license.plugin.url"/>
|
||||
<makeurl property="integ.license.plugin.url" file="${org.elasticsearch:elasticsearch-license-plugin:zip}"/>
|
||||
<echo>Installing license plugin...</echo>
|
||||
<run-script dir="${integ.home}" script="bin/plugin"
|
||||
args="-u ${integ.license.plugin.url} -i elasticsearch-license-plugin"/>
|
||||
<!-- end commercial plugin mods -->
|
||||
|
||||
<makeurl property="integ.plugin.url" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
|
||||
|
||||
<echo>Installing plugin ${project.artifactId}...</echo>
|
||||
<run-script dir="${integ.home}" script="bin/plugin"
|
||||
args="-u ${integ.plugin.url} -i ${project.artifactId}"/>
|
||||
|
||||
<!-- execute -->
|
||||
<echo>Starting up external cluster...</echo>
|
||||
<run-script dir="${integ.home}" script="bin/elasticsearch" spawn="true"
|
||||
args="${integ.args} -Des.path.repo=${integ.repo.home}"/>
|
||||
|
||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
||||
<http url="http://127.0.0.1:9200"/>
|
||||
</waitfor>
|
||||
|
||||
<extract-pid property="integ.pid"/>
|
||||
<echo>External cluster started PID ${integ.pid}</echo>
|
||||
</target>
|
||||
</project>
|
12
pom.xml
12
pom.xml
|
@ -16,13 +16,15 @@
|
|||
</scm>
|
||||
|
||||
<parent>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<groupId>org.elasticsearch.plugin</groupId>
|
||||
<artifactId>elasticsearch-plugin</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<elasticsearch.license.header>dev-tools/elasticsearch_license_header.txt</elasticsearch.license.header>
|
||||
<elasticsearch.license.headerDefinition>dev-tools/license_header_definition.xml</elasticsearch.license.headerDefinition>
|
||||
<elasticsearch.integ.antfile>dev-tools/integration-tests.xml</elasticsearch.integ.antfile>
|
||||
<license.plugin.version>2.0.0-SNAPSHOT</license.plugin.version>
|
||||
<shield.plugin.version>2.0.0-SNAPSHOT</shield.plugin.version>
|
||||
<tests.rest.load_packaged>false</tests.rest.load_packaged>
|
||||
|
@ -87,6 +89,14 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-license-plugin</artifactId>
|
||||
<version>${license.plugin.version}</version>
|
||||
<type>zip</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- needed for tests that use templating -->
|
||||
<dependency>
|
||||
<groupId>com.github.spullara.mustache.java</groupId>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue