e2e: $CLEANUP decides whether to rm containers

This commit is contained in:
Tim Hockin 2022-07-01 12:32:48 -07:00
parent fa8815953a
commit 6d5902196a
1 changed files with 10 additions and 2 deletions

View File

@ -73,9 +73,13 @@ function assert_file_contains() {
# Helper: run a docker container.
function docker_run() {
RM="--rm"
if [[ "${CLEANUP:-}" == 0 ]]; then
RM=""
fi
docker run \
-d \
--rm \
${RM} \
--label git-sync-e2e="$RUNID" \
"$@"
sleep 2 # wait for it to come up
@ -154,9 +158,13 @@ touch $RUNLOG
function GIT_SYNC() {
#./bin/linux_amd64/git-sync "$@"
RM="--rm"
if [[ "${CLEANUP:-}" == 0 ]]; then
RM=""
fi
docker run \
-i \
--rm \
${RM} \
--label git-sync-e2e="$RUNID" \
--network="host" \
-u $(id -u):$(id -g) \