Skip to content

Commit

Permalink
LRQA-54780 Add macrodef to start ccr trial
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda Sui authored and brianchandotcom committed Feb 26, 2020
1 parent c017064 commit 0d5a293
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions build-test-elasticsearch7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,42 @@ ${line.separator}CATALINA_OPTS="${CATALINA_OPTS} -Djavax.net.ssl.trustStore=${el
</sequential>
</macrodef>

<macrodef name="start-ccr-trial">
<sequential>
<exec executable="curl" outputproperty="curl.output.trial">
<arg line="-X POST &quot;http://localhost:9200/_license/start_trial?acknowledge=true&quot; -H &apos;Content-Type:application/json&apos;" />
</exec>

<echo>${curl.output.trial}</echo>

<if>
<contains string="${curl.output.trial}" substring="&quot;trial_was_started&quot;:true" />
<then>
<echo>Leader Elasticsearch started with trial.</echo>
</then>
<else>
<fail>Leader Elasticsearch failed to start with trial.</fail>
</else>
</if>

<exec executable="curl" outputproperty="curl.output.trial">
<arg line="-X POST &quot;http://localhost:9202/_license/start_trial?acknowledge=true&quot; -H &apos;Content-Type:application/json&apos;" />
</exec>

<echo>${curl.output.trial}</echo>

<if>
<contains string="${curl.output.trial}" substring="&quot;trial_was_started&quot;:true" />
<then>
<echo>Follower Elasticsearch started with trial.</echo>
</then>
<else>
<fail>Follower Elasticsearch failed to start with trial.</fail>
</else>
</if>
</sequential>
</macrodef>

<macrodef name="start-x-pack-trial">
<sequential>
<exec executable="curl" outputproperty="curl.output.trial">
Expand Down

0 comments on commit 0d5a293

Please sign in to comment.