Make wait_for print the failed ouput.

This can help to identify what exactly the failure was.  For instance
during overcloud validation "heat stack-show pingtest_stack" can
provide more context to the actual error.

Change-Id: I18a73b2936975c056ebc3f4b984349b61a4ed58d
This commit is contained in:
Sofer Athlan-Guyot 2017-09-28 12:35:40 +02:00 committed by Sagi Shnaidman
parent 7a2edf70ec
commit 8c671f90db
1 changed files with 3 additions and 1 deletions

View File

@ -133,7 +133,9 @@ function check_cmd {
exit 0
elif [[ -n "$FAIL_MATCH_OUTPUT" ]] \
&& [[ $OUTPUT =~ $FAIL_MATCH_OUTPUT ]]; then
echo "Command output matched '$FAIL_MATCH_OUTPUT'. Exiting..."
echo "Command output matched '$FAIL_MATCH_OUTPUT'. Here is the complete output failure:"
echo "${OUTPUT}"
echo "Exiting ..."
exit 1
elif [[ -z "$SUCCESSFUL_MATCH_OUTPUT" ]] && [[ $STATUS -eq 0 ]]; then
# The command successfully completed and we aren't testing against