Adds test case for elasticsearch script

This commit is contained in:
André Carvalho 2015-09-17 22:22:09 -03:00
parent 9ab6e01f4d
commit 139a65770a
1 changed files with 12 additions and 0 deletions

View File

@ -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" {