diff --git a/plugin/bin/x-pack/croneval b/plugin/bin/x-pack/croneval index 422680520dc..c35d874559f 100755 --- a/plugin/bin/x-pack/croneval +++ b/plugin/bin/x-pack/croneval @@ -93,10 +93,6 @@ fi declare -a args=("$@") -if [ -e "$CONF_DIR" ]; then - args=("${args[@]}" -Edefault.path.conf="$CONF_DIR") -fi - 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[@]}" status=$? diff --git a/qa/vagrant/src/test/resources/packaging/tests/10_basic.bats b/qa/vagrant/src/test/resources/packaging/tests/10_basic.bats index 30c91ea94c2..28d653dd16f 100644 --- a/qa/vagrant/src/test/resources/packaging/tests/10_basic.bats +++ b/qa/vagrant/src/test/resources/packaging/tests/10_basic.bats @@ -49,4 +49,13 @@ setup() { assert_file "$ESCONFIG/x-pack/roles.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 -} \ No newline at end of file +} + +@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 + } +}