Watcher: Fix croneval tool for packaging (elastic/x-pack-elasticsearch#1689)
The croneval script used an old parameter to start up. This commit removes this parameter, that is used, when a package is used. In addition a concrete vagrant test has been added. relates elastic/x-pack-elasticsearch#1635 Original commit: elastic/x-pack-elasticsearch@ea7b8a08f4
This commit is contained in:
parent
83a5e022cb
commit
27b5142de6
|
@ -93,10 +93,6 @@ fi
|
||||||
|
|
||||||
declare -a args=("$@")
|
declare -a args=("$@")
|
||||||
|
|
||||||
if [ -e "$CONF_DIR" ]; then
|
|
||||||
args=("${args[@]}" -Edefault.path.conf="$CONF_DIR")
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$ES_HOME" > /dev/null
|
cd "$ES_HOME" > /dev/null
|
||||||
"$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" org.elasticsearch.xpack.watcher.trigger.schedule.tool.CronEvalTool "${args[@]}"
|
"$JAVA" $ES_JAVA_OPTS -cp "$ES_CLASSPATH" -Des.path.home="$ES_HOME" org.elasticsearch.xpack.watcher.trigger.schedule.tool.CronEvalTool "${args[@]}"
|
||||||
status=$?
|
status=$?
|
||||||
|
|
|
@ -50,3 +50,12 @@ setup() {
|
||||||
assert_file "$ESCONFIG/x-pack/role_mapping.yml" f elasticsearch elasticsearch 660
|
assert_file "$ESCONFIG/x-pack/role_mapping.yml" f elasticsearch elasticsearch 660
|
||||||
assert_file "$ESCONFIG/x-pack/log4j2.properties" f elasticsearch elasticsearch 660
|
assert_file "$ESCONFIG/x-pack/log4j2.properties" f elasticsearch elasticsearch 660
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "[X-PACK] verify croneval works" {
|
||||||
|
run $ESHOME/bin/x-pack/croneval "0 0 20 ? * MON-THU" -c 2
|
||||||
|
[ "$status" -eq 0 ]
|
||||||
|
[[ "$output" == *"Valid!"* ]] || {
|
||||||
|
echo "Expected output message to contain [Valid!] but found: $output"
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue