37 lines
1.7 KiB
XML
37 lines
1.7 KiB
XML
<?xml version="1.0"?>
|
|
<project name="commercial-integration-tests">
|
|
|
|
<import file="${elasticsearch.integ.antfile.default}"/>
|
|
|
|
<!-- 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" />
|
|
|
|
<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"/>
|
|
</target>
|
|
</project>
|