Skip to content

Commit

Permalink
fix(deps): error out if compose up fails
Browse files Browse the repository at this point in the history
typically happens when network ports are in use. Previously
it would just hang waiting for a non-started service to go
healthy.
  • Loading branch information
Tieske committed Feb 6, 2024
1 parent b9e9dfe commit 4aee922
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
older images after a Pongo upgrade. A new image will automatically be build now.
[#516](https://github.com/Kong/kong-pongo/pull/516).

* Fix: fail if the compose-up command fails. To prevent hanging while waiting for a
health-check to go healthy.
[#522](https://github.com/Kong/kong-pongo/pull/522).

* Fix: do not fail the build if httpie cannot be installed. Now continues the
build since it is optional.
[#515](https://github.com/Kong/kong-pongo/pull/515).
Expand Down
4 changes: 2 additions & 2 deletions pongo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ function ensure_available {
fi
if [[ ! $? -eq 0 ]]; then
msg "auto-starting the test environment, use the 'pongo down' action to stop it"
compose_up
compose_up || err "failed to start the test environment"
fi

local dependency
Expand Down Expand Up @@ -845,7 +845,7 @@ function pongo_clean {

function pongo_expose {
local dependency="expose"
healthy "$(cid "$dependency")" "$dependency" || compose up -d "$dependency"
healthy "$(cid "$dependency")" "$dependency" || compose up -d "$dependency" || err "failed to start '$dependency'"
wait_for_dependency "$dependency"
}

Expand Down

0 comments on commit 4aee922

Please sign in to comment.