Skip to content

Commit

Permalink
Add DOCKER_IMAGE env var to test runner scripts
Browse files Browse the repository at this point in the history
- Give an easy way to override which docker image the tests will run
inside

[#164839268]

Signed-off-by: Ryan Richard <[email protected]>
Co-authored-by: Ryan Richard <[email protected]>
  • Loading branch information
2 people authored and cf-uaa committed Mar 29, 2019
1 parent f585471 commit f40a152
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ case "$1" in
exit 1
esac

if [[ -z "${DOCKER_IMAGE+x}" ]]; then
DOCKER_IMAGE="cfidentity/uaa-${DB_IMAGE_NAME}"
fi

docker run --privileged -t -i --shm-size=1G \
-v "${SCRIPT_DIR}":"${CONTAINER_SCRIPT_DIR}" \
-v "${GRADLE_LOCK_DIR}" \
--env DB=${DB} \
"cfidentity/uaa-${DB_IMAGE_NAME}" \
"${DOCKER_IMAGE}" \
/root/uaa/scripts/integration-tests.sh "${PROFILE_NAME}",default "${CONTAINER_SCRIPT_DIR}"
6 changes: 5 additions & 1 deletion run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ case "$1" in
exit 1
esac

if [[ -z "${DOCKER_IMAGE+x}" ]]; then
DOCKER_IMAGE="cfidentity/uaa-${DB_IMAGE_NAME}"
fi

docker run --privileged -t -i --shm-size=1G \
-v "${SCRIPT_DIR}":"${CONTAINER_SCRIPT_DIR}" \
-v "${GRADLE_LOCK_DIR}" \
--env DB=${DB} \
"cfidentity/uaa-${DB_IMAGE_NAME}" \
"${DOCKER_IMAGE}" \
/root/uaa/scripts/unit-tests.sh "${PROFILE_NAME}",default "${CONTAINER_SCRIPT_DIR}"

0 comments on commit f40a152

Please sign in to comment.