remove dependency on license zip in test scope and update integration test xml
Original commit: elastic/x-pack-elasticsearch@c7b4f67b3f
This commit is contained in:
parent
79e12ad65b
commit
4619e71af1
|
@ -3,59 +3,34 @@
|
||||||
|
|
||||||
<import file="${elasticsearch.integ.antfile.default}"/>
|
<import file="${elasticsearch.integ.antfile.default}"/>
|
||||||
|
|
||||||
<!-- unzip core release artifact, install license plugin, install plugin, then start ES -->
|
<!-- TODO shield redefines this because the wait for http will fail due to auth -->
|
||||||
<target name="start-external-cluster-with-plugin" depends="stop-external-cluster" unless="${shouldskip}">
|
<macrodef name="startup-elasticsearch">
|
||||||
<local name="integ.home"/>
|
<attribute name="home" default="${integ.scratch}/elasticsearch-${elasticsearch.version}"/>
|
||||||
<local name="integ.repo.home"/>
|
<attribute name="args" default="${integ.args}"/>
|
||||||
<local name="integ.plugin.url"/>
|
<sequential>
|
||||||
<local name="integ.pid"/>
|
<echo>Starting up external cluster...</echo>
|
||||||
|
<run-script dir="@{home}" script="bin/elasticsearch" spawn="true"
|
||||||
|
args="@{args} -Des.path.repo=@{home}/repo" />
|
||||||
|
|
||||||
<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}"/>
|
|
||||||
|
|
||||||
<!-- begin shield plugin mods -->
|
|
||||||
<run-script dir="${integ.home}" script="bin/shield/esusers"
|
|
||||||
args="useradd test_user -p changeme -r admin"/>
|
|
||||||
|
|
||||||
<!-- seems waitfor task doesnt support basic auth?
|
|
||||||
we do the next best thing, wait for the socket, then verify with get
|
|
||||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
||||||
<http url="http://test_user:changeme@127.0.0.1:9200"/>
|
<socket server="127.0.0.1" port="9200"/>
|
||||||
</waitfor>
|
</waitfor>
|
||||||
-->
|
|
||||||
|
|
||||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
<local name="integ.pid"/>
|
||||||
<socket server="127.0.0.1" port="9200"/>
|
<extract-pid property="integ.pid"/>
|
||||||
</waitfor>
|
<echo>External cluster started PID ${integ.pid}</echo>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="start-external-cluster-with-plugin" depends="setup-workspace" unless="${shouldskip}">
|
||||||
|
<install-plugin name="elasticsearch-license" file="${integ.deps}/elasticsearch-license-plugin-${project.version}.zip" />
|
||||||
|
<install-plugin name="${project.artifactId}" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
|
||||||
|
<run-script dir="${integ.scratch}/elasticsearch-${elasticsearch.version}" script="bin/shield/esusers"
|
||||||
|
args="useradd test_user -p changeme -r admin"/>
|
||||||
|
<startup-elasticsearch/>
|
||||||
|
|
||||||
<local name="temp.file"/>
|
<local name="temp.file"/>
|
||||||
<tempfile property="temp.file" destdir="${java.io.tmpdir}"/>
|
<tempfile property="temp.file" destdir="${java.io.tmpdir}"/>
|
||||||
<get src="http://127.0.0.1:9200" dest="${temp.file}" username="test_user" password="changeme" verbose="true" retries="10"/>
|
<get src="http://127.0.0.1:9200" dest="${temp.file}" username="test_user" password="changeme" verbose="true" retries="10"/>
|
||||||
<!-- end shield plugin mods -->
|
|
||||||
|
|
||||||
<extract-pid property="integ.pid"/>
|
|
||||||
<echo>External cluster started PID ${integ.pid}</echo>
|
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<tests.rest.blacklist>indices.get/10_basic/*allow_no_indices*,cat.count/10_basic/Test cat count output,cat.aliases/10_basic/Empty cluster,indices.segments/10_basic/no segments test,indices.clear_cache/10_basic/clear_cache test,indices.status/10_basic/Indices status test,cat.indices/10_basic/Test cat indices output,cat.recovery/10_basic/Test cat recovery output,cat.shards/10_basic/Test cat shards output,termvector/20_issue7121/*,index/10_with_id/Index with ID,indices.get_alias/20_emtpy/*,cat.segments/10_basic/Test cat segments output,indices.put_settings/10_basic/Test indices settings allow_no_indices,indices.put_settings/10_basic/Test indices settings ignore_unavailable,indices.refresh/10_basic/Indices refresh test no-match wildcard,indices.stats/10_index/Index - star*,indices.recovery/10_basic/Indices recovery test*,template/30_render_search_template/*</tests.rest.blacklist>
|
<tests.rest.blacklist>indices.get/10_basic/*allow_no_indices*,cat.count/10_basic/Test cat count output,cat.aliases/10_basic/Empty cluster,indices.segments/10_basic/no segments test,indices.clear_cache/10_basic/clear_cache test,indices.status/10_basic/Indices status test,cat.indices/10_basic/Test cat indices output,cat.recovery/10_basic/Test cat recovery output,cat.shards/10_basic/Test cat shards output,termvector/20_issue7121/*,index/10_with_id/Index with ID,indices.get_alias/20_emtpy/*,cat.segments/10_basic/Test cat segments output,indices.put_settings/10_basic/Test indices settings allow_no_indices,indices.put_settings/10_basic/Test indices settings ignore_unavailable,indices.refresh/10_basic/Indices refresh test no-match wildcard,indices.stats/10_index/Index - star*,indices.recovery/10_basic/Indices recovery test*,template/30_render_search_template/*</tests.rest.blacklist>
|
||||||
<!-- TODO: refactor -->
|
<!-- TODO: refactor -->
|
||||||
<elasticsearch.integ.antfile>${basedir}/dev-tools/integration-tests.xml</elasticsearch.integ.antfile>
|
<elasticsearch.integ.antfile>${basedir}/dev-tools/integration-tests.xml</elasticsearch.integ.antfile>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -36,14 +36,6 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.elasticsearch</groupId>
|
|
||||||
<artifactId>elasticsearch-license-plugin</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- real dependencies -->
|
<!-- real dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.elasticsearch</groupId>
|
<groupId>org.elasticsearch</groupId>
|
||||||
|
@ -87,6 +79,36 @@
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-eclipse-plugin</artifactId>
|
<artifactId>maven-eclipse-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>integ-setup-dependencies</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems combine.children="append">
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.elasticsearch</groupId>
|
||||||
|
<artifactId>elasticsearch-license-plugin</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -3,44 +3,9 @@
|
||||||
|
|
||||||
<import file="${elasticsearch.integ.antfile.default}"/>
|
<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="setup-workspace" unless="${shouldskip}">
|
||||||
<target name="start-external-cluster-with-plugin" depends="stop-external-cluster" unless="${shouldskip}">
|
<install-plugin name="elasticsearch-license" file="${integ.deps}/elasticsearch-license-plugin-${project.version}.zip" />
|
||||||
<local name="integ.home"/>
|
<install-plugin name="${project.artifactId}" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
|
||||||
<local name="integ.repo.home"/>
|
<startup-elasticsearch/>
|
||||||
<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>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -43,14 +43,6 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.elasticsearch</groupId>
|
|
||||||
<artifactId>elasticsearch-license-plugin</artifactId>
|
|
||||||
<version>${project.version}</version>
|
|
||||||
<type>zip</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Regular dependencies -->
|
<!-- Regular dependencies -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -139,6 +131,34 @@
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>integ-setup-dependencies</id>
|
||||||
|
<phase>pre-integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems combine.children="append">
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.elasticsearch</groupId>
|
||||||
|
<artifactId>elasticsearch-license-plugin</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<type>zip</type>
|
||||||
|
<overWrite>true</overWrite>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue