Skip to content

Commit

Permalink
Revert "Remove the --ignore-blank-lines flag from the e2e_logging_con…
Browse files Browse the repository at this point in the history
…tent.sh script."

PiperOrigin-RevId: 640668286
  • Loading branch information
wnojopra committed Jul 18, 2024
1 parent 97ecbe1 commit b8a6cde
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/integration/e2e_logging_content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,24 @@ echo "Checking output..."
# Check the results
readonly STDOUT_RESULT_EXPECTED="$(echo -n "${STDOUT_MSG%.}")"

# There is a bug with the Batch API where blank lines
# do not get printed to log files.
# Temporarily ignore blank lines for the Batch provider.
diff_args=()
if [[ "${DSUB_PROVIDER}" == "google-batch" ]]; then
diff_args+=("--ignore-blank-lines")
fi

readonly STDOUT_RESULT="$(gsutil cat "${STDOUT_LOG}")"
if ! diff <(echo "${STDOUT_RESULT_EXPECTED}") <(echo "${STDOUT_RESULT}"); then
if ! diff "${diff_args[@]}" <(echo "${STDOUT_RESULT_EXPECTED}") <(echo "${STDOUT_RESULT}"); then
echo "STDOUT file does not match expected"
exit 1
fi

readonly STDERR_RESULT_EXPECTED="$(echo -n "${STDERR_MSG%.}")"

readonly STDERR_RESULT="$(gsutil cat "${STDERR_LOG}")"
if ! diff <(echo "${STDERR_RESULT_EXPECTED}") <(echo "${STDERR_RESULT}"); then
if ! diff "${diff_args[@]}" <(echo "${STDERR_RESULT_EXPECTED}") <(echo "${STDERR_RESULT}"); then
echo "STDERR file does not match expected"
exit 1
fi
Expand Down

0 comments on commit b8a6cde

Please sign in to comment.