2015-07-09 02:48:45 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<project name="commercial-integration-tests">
|
|
|
|
|
|
|
|
<import file="${elasticsearch.integ.antfile.default}"/>
|
|
|
|
|
2015-08-06 08:32:49 -04:00
|
|
|
<!-- redefined to work with auth -->
|
|
|
|
<macrodef name="waitfor-elasticsearch">
|
|
|
|
<attribute name="port"/>
|
|
|
|
<attribute name="timeoutproperty"/>
|
2015-07-15 13:31:12 -04:00
|
|
|
<sequential>
|
2015-08-06 08:32:49 -04:00
|
|
|
<echo>Waiting for elasticsearch to become available on port @{port}...</echo>
|
|
|
|
<waitfor maxwait="30" maxwaitunit="second"
|
|
|
|
checkevery="500" checkeveryunit="millisecond"
|
|
|
|
timeoutproperty="@{timeoutproperty}">
|
|
|
|
<socket server="127.0.0.1" port="@{port}"/>
|
2015-07-15 13:31:12 -04:00
|
|
|
</waitfor>
|
|
|
|
</sequential>
|
|
|
|
</macrodef>
|
2015-07-09 02:48:45 -04:00
|
|
|
|
2015-08-06 06:13:16 -04:00
|
|
|
<target name="start-external-cluster-with-plugin" depends="setup-workspace">
|
2015-07-31 14:20:18 -04:00
|
|
|
<local name="home"/>
|
|
|
|
<property name="home" location="${integ.scratch}/elasticsearch-${elasticsearch.version}"/>
|
2015-08-06 09:46:48 -04:00
|
|
|
<install-plugin name="elasticsearch-license" file="${integ.deps}/elasticsearch-license-${project.version}.zip" />
|
2015-07-15 13:31:12 -04:00
|
|
|
<install-plugin name="${project.artifactId}" file="${project.build.directory}/releases/${project.artifactId}-${project.version}.zip"/>
|
2015-08-11 09:01:14 -04:00
|
|
|
<run-script script="${home}/bin/shield/esusers">
|
|
|
|
<nested>
|
|
|
|
<arg value="useradd"/>
|
|
|
|
<arg value="test_user"/>
|
|
|
|
<arg value="-p"/>
|
|
|
|
<arg value="changeme"/>
|
|
|
|
<arg value="-r"/>
|
|
|
|
<arg value="admin"/>
|
|
|
|
</nested>
|
|
|
|
</run-script>
|
2015-07-15 13:31:12 -04:00
|
|
|
<startup-elasticsearch/>
|
2015-08-06 08:32:49 -04:00
|
|
|
<echo>Checking we can connect with basic auth on port ${integ.http.port}...</echo>
|
2015-07-09 02:48:45 -04:00
|
|
|
<local name="temp.file"/>
|
2015-07-09 02:56:41 -04:00
|
|
|
<tempfile property="temp.file" destdir="${java.io.tmpdir}"/>
|
2015-08-06 08:32:49 -04:00
|
|
|
<get src="http://127.0.0.1:${integ.http.port}" dest="${temp.file}"
|
|
|
|
username="test_user" password="changeme" verbose="true" retries="10"/>
|
2015-07-09 02:48:45 -04:00
|
|
|
</target>
|
|
|
|
</project>
|