vagrant tests: fix plugin outupt test

package installation creates the plugin directory already so when a plugin
is installed it prints the additional line
Plugins directory [/tmp/elasticsearch/plugins] does not exist. Creating...
This commit is contained in:
Britta Weber 2015-10-06 17:33:09 +02:00
parent a798f4f711
commit aa19a4134d
1 changed files with 27 additions and 10 deletions

View File

@ -357,21 +357,38 @@ fi
local relativePath=${1:-$(readlink -m jvm-example-*.zip)}
sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" install "file://$relativePath" > /tmp/plugin-cli-output
local loglines=$(cat /tmp/plugin-cli-output | wc -l)
[ "$loglines" = "6" ] || {
echo "Expected 6 lines but the output was:"
cat /tmp/plugin-cli-output
false
}
if [ "$GROUP" == "TAR PLUGINS" ]; then
# tar extraction does not create the plugins directory so the plugin tool will print an additional line that the directory will be created
[ "$loglines" -eq "7" ] || {
echo "Expected 7 lines but the output was:"
cat /tmp/plugin-cli-output
false
}
else
[ "$loglines" -eq "6" ] || {
echo "Expected 6 lines but the output was:"
cat /tmp/plugin-cli-output
false
}
fi
remove_jvm_example
local relativePath=${1:-$(readlink -m jvm-example-*.zip)}
sudo -E -u $ESPLUGIN_COMMAND_USER "$ESHOME/bin/plugin" install "file://$relativePath" -Des.logger.level=DEBUG > /tmp/plugin-cli-output
local loglines=$(cat /tmp/plugin-cli-output | wc -l)
[ "$loglines" -gt "6" ] || {
echo "Expected more than 6 lines but the output was:"
cat /tmp/plugin-cli-output
false
}
if [ "$GROUP" == "TAR PLUGINS" ]; then
[ "$loglines" -gt "7" ] || {
echo "Expected more than 7 lines but the output was:"
cat /tmp/plugin-cli-output
false
}
else
[ "$loglines" -gt "6" ] || {
echo "Expected more than 6 lines but the output was:"
cat /tmp/plugin-cli-output
false
}
fi
remove_jvm_example
}