mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 00:49:11 +00:00
We have a smoke_test_plugins.py, but its a bit slow, not integrated into our build, etc. I converted this into an integration test. It is definitely uglier but more robust and fast (e.g. 20 seconds time to verify). Also there is refactoring of existing integ tests logic, like printing out commands we execute and stuff
43 lines
1.4 KiB
XML
43 lines
1.4 KiB
XML
<?xml version="1.0"?>
|
|
<project name="smoke-test-plugins"
|
|
xmlns:ac="antlib:net.sf.antcontrib">
|
|
|
|
<import file="${elasticsearch.integ.antfile.default}"/>
|
|
|
|
<macrodef name="convert-plugin-name">
|
|
<attribute name="file"/>
|
|
<attribute name="outputproperty"/>
|
|
<sequential>
|
|
<local name="file.base"/>
|
|
<basename file="@{file}" property="file.base"/>
|
|
<filter-property src="file.base" dest="@{outputproperty}">
|
|
<chain>
|
|
<replaceregex pattern="^elasticsearch-" replace=""/>
|
|
<replacestring from="-${elasticsearch.version}.zip" to=""/>
|
|
</chain>
|
|
</filter-property>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="start-external-cluster-with-plugins" depends="setup-workspace" unless="${shouldskip}">
|
|
<fail message="Expected ${expected.plugin.count} dependencies, are plugins missing from this pom.xml?">
|
|
<condition>
|
|
<resourcecount count="${expected.plugin.count}" when="ne">
|
|
<fileset dir="${integ.deps}/plugins"/>
|
|
</resourcecount>
|
|
</condition>
|
|
</fail>
|
|
<ac:for param="file">
|
|
<path>
|
|
<fileset dir="${integ.deps}/plugins"/>
|
|
</path>
|
|
<sequential>
|
|
<local name="plugin.name"/>
|
|
<convert-plugin-name file="@{file}" outputproperty="plugin.name"/>
|
|
<install-plugin name="${plugin.name}" file="@{file}"/>
|
|
</sequential>
|
|
</ac:for>
|
|
<startup-elasticsearch/>
|
|
</target>
|
|
</project>
|