Fix infinite loop issue on container healthcheck
Signed-off-by: guillaume <guillaume.derouville@gmail.com>
This commit is contained in:
parent
ec3c39aea0
commit
6ce8731d69
@ -88,7 +88,8 @@ setup() {
|
||||
@test "docker run: ports" {
|
||||
dagger -e docker-run-ports up
|
||||
CONTAINER=$(docker container ls -q --filter "name=daggerci-test-ports-*")
|
||||
until docker inspect --format "{{json .State.Status }}" "$CONTAINER" | grep -m 1 "running"; do sleep 1 ; done
|
||||
SECONDS=0
|
||||
while [[ "$(docker inspect --format '{{json .State.Status }}' todoapp | grep -m 1 'running')" != "running" && $SECONDS -lt 45 ]]; do sleep 1 ; done
|
||||
run curl -f -LI http://localhost:8080
|
||||
assert_output --partial '200 OK'
|
||||
docker stop "$CONTAINER" && docker rm "$CONTAINER"
|
||||
|
Reference in New Issue
Block a user