From 139a65770a46760380491467804bb56e95e1af0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carvalho?= Date: Thu, 17 Sep 2015 22:22:09 -0300 Subject: [PATCH] Adds test case for elasticsearch script --- .../packaging/scripts/plugin_test_cases.bash | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash b/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash index 4f3bced276f..ad05c893499 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash +++ b/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash @@ -125,6 +125,18 @@ fi remove_jvm_example } +@test "[$GROUP] fail if java executable is not found" { + [ "$GROUP" == "TAR PLUGINS" ] || skip "Test case only supported by TAR PLUGINS" + export JAVA=$(which java) + + sudo chmod -x $JAVA + run "$ESHOME/bin/plugin" + sudo chmod +x $JAVA + + [ "$status" -eq 1 ] + [ "$output" = "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" ] +} + # Note that all of the tests from here to the end of the file expect to be run # in sequence and don't take well to being run one at a time. @test "[$GROUP] install jvm-example plugin" {