Skip to content

Commit

Permalink
Delay removal of containers during Docker image tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hashhar committed Feb 14, 2022
1 parent 6047480 commit 3434780
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/docker/container-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function cleanup {
if [[ ! -z ${CONTAINER_ID:-} ]]; then
docker stop "${CONTAINER_ID}"
docker rm -f "${CONTAINER_ID}"
fi
}

Expand All @@ -13,7 +13,8 @@ function test_trino_starts {

local CONTAINER_NAME=$1
local PLATFORM=$2
CONTAINER_ID=$(docker run -d --rm --platform ${PLATFORM} "${CONTAINER_NAME}")
# We aren't passing --rm here to make sure container is available for inspection in case of failures
CONTAINER_ID=$(docker run -d --platform ${PLATFORM} "${CONTAINER_NAME}")

set +e
I=0
Expand Down

0 comments on commit 3434780

Please sign in to comment.