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}"/>
|
||||
|
||||
<!-- 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"/>
|
||||
<!-- TODO shield redefines this because the wait for http will fail due to auth -->
|
||||
<macrodef name="startup-elasticsearch">
|
||||
<attribute name="home" default="${integ.scratch}/elasticsearch-${elasticsearch.version}"/>
|
||||
<attribute name="args" default="${integ.args}"/>
|
||||
<sequential>
|
||||
<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">
|
||||
<http url="http://test_user:changeme@127.0.0.1:9200"/>
|
||||
<socket server="127.0.0.1" port="9200"/>
|
||||
</waitfor>
|
||||
-->
|
||||
|
||||
<waitfor maxwait="3" maxwaitunit="minute" checkevery="500">
|
||||
<socket server="127.0.0.1" port="9200"/>
|
||||
</waitfor>
|
||||
<local name="integ.pid"/>
|
||||
<extract-pid property="integ.pid"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<!-- end shield plugin mods -->
|
||||
|
||||
<extract-pid property="integ.pid"/>
|
||||
<echo>External cluster started PID ${integ.pid}</echo>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
<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>
|
||||
<!-- TODO: refactor -->
|
||||
<elasticsearch.integ.antfile>${basedir}/dev-tools/integration-tests.xml</elasticsearch.integ.antfile>
|
||||
<!-- TODO: refactor -->
|
||||
<elasticsearch.integ.antfile>${basedir}/dev-tools/integration-tests.xml</elasticsearch.integ.antfile>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -36,14 +36,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-license-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- real dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
|
@ -87,6 +79,36 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
</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>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
|
|
|
@ -3,44 +3,9 @@
|
|||
|
||||
<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 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"/>
|
||||
<startup-elasticsearch/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -43,14 +43,6 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.elasticsearch</groupId>
|
||||
<artifactId>elasticsearch-license-plugin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>zip</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Regular dependencies -->
|
||||
|
||||
<dependency>
|
||||
|
@ -139,6 +131,34 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
</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>
|
||||
</build>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue