Skip to content

Commit

Permalink
rename function to dump logs
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Oct 3, 2024
1 parent 7292cdd commit efd294f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/dbp-charts/verify-compose/docker_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ COMPOSE_PATH=$(dirname $COMPOSE_FILE_PATH)
COMPOSE_BIN="docker compose"
alf_port=8080

containers_dump_logs_on_error() {
dump_all_compose_logs() {
echo "Dumping logs for all containers"
$COMPOSE_BIN -f "${COMPOSE_FILE}" logs --no-color
exit 1
Expand All @@ -21,7 +21,7 @@ wait_result() {
echo "Waited ${COUNTER} seconds"
echo "$COMPONENT could not start in time."
echo "The last response code was ${response}"
containers_dump_logs_on_error
dump_all_compose_logs
fi
}

Expand Down Expand Up @@ -84,4 +84,4 @@ docker run -a STDOUT --volume "${PWD}"/test/postman/docker-compose:/etc/newman -

retVal=$?

[ "${retVal}" -eq 0 ] && echo "Postman tests were successful" || containers_dump_logs_on_error
[ "${retVal}" -eq 0 ] && echo "Postman tests were successful" || dump_all_compose_logs

0 comments on commit efd294f

Please sign in to comment.