Skip to content

Commit

Permalink
Fix capture of error
Browse files Browse the repository at this point in the history
  • Loading branch information
welpaolo committed Nov 12, 2023
1 parent add9b41 commit f7f3263
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integration/integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ run_example_job_with_error_in_pod() {
fi

# Check job output
res=$(kubectl logs $(kubectl get pods -n ${NAMESPACE} | grep driver | tail -n 1 | cut -d' ' -f1) -n ${NAMESPACE} | grep 'Service "entrypoint" stopped unexpectedly with code 1' | wc -l)
res=$(kubectl logs $(kubectl get pods -n ${NAMESPACE} | grep driver | tail -n 1 | cut -d' ' -f1) -n ${NAMESPACE} | grep 'Exception in thread' | wc -l)
echo -e "Number of errors: \n ${res}"
if [ "${res}" != "1" ]; then
echo "ERROR: Error is not captured."
Expand All @@ -296,6 +296,9 @@ run_example_job_with_error_in_pod() {
echo "ERROR: Status should not be set to Completed."
exit 1
fi
if [ "${status}" = "Error" ]; then
echo "Status is correctly set to ERROR!"
fi

}

Expand Down

0 comments on commit f7f3263

Please sign in to comment.