Merge pull request #6730 from Security-Onion-Solutions/fix/ub1804ssl

more detailed logging for the retry command
This commit is contained in:
Josh Patterson
2021-12-30 13:19:58 -05:00
committed by GitHub

View File

@@ -311,12 +311,19 @@ retry() {
if [[ "$output" =~ "$expectedOutput" ]]; then
return $exitcode
else
echo "Expected '$expectedOutput' but got '$output'"
echo "Did not find expectedOutput: '$expectedOutput' in the output below from running the command: '$cmd'"
echo "<Start of output>"
echo "$output"
echo "<End of output>"
fi
elif [ -n "$failedOutput" ]; then
if [[ "$output" =~ "$failedOutput" ]]; then
echo "Found failed output '$failedOutput' in '$output'. Setting exitcode to 1."
echo "Found failedOutput: '$failedOutput' in the output below from running the command: '$cmd'"
echo "<Start of output>"
echo "$output"
echo "<End of output>"
if [[ $exitcode -eq 0 ]]; then
echo "The exitcode was 0, but we are setting to 1 since we found $failedOutput in the output."
exitcode=1
fi
else