From ab1bd5db53e6ac762dcf3c8b03aaf5701c3e07e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carvalho?= Date: Thu, 17 Sep 2015 22:22:20 -0300 Subject: [PATCH] Adds test case for plugins script --- .../resources/packaging/scripts/20_tar_package.bats | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats b/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats index 3b5acc75d57..7139306aece 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats @@ -72,6 +72,17 @@ setup() { verify_archive_installation } +@test "[TAR] elasticsearch fails if java executable is not found" { + export JAVA=$(which java) + + sudo chmod -x $JAVA + run "$ESHOME/bin/elasticsearch" + 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" ] +} + ################################## # Check that Elasticsearch is working ##################################