Skip to content

Commit 7368451

Browse files
joshjmsivanvc
andcommitted
Change IMAGE to TEST_IMAGE
Partial backport of #19305 Refactor scripts/test_images.sh * Rename the input "IMAGE" to "TEST_IMAGE" to avoid clashing with the environment variable from the Prow infrastructure. Co-authored-by: ivanvc <[email protected]> Signed-off-by: joshjms <[email protected]>
1 parent 2d72ea1 commit 7368451

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/test_images.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ source ./scripts/test_lib.sh
88

99
function startContainer {
1010
# run docker in the background
11-
docker run -d --rm --name "${RUN_NAME}" "${IMAGE}"
11+
docker run -d --rm --name "${RUN_NAME}" "${TEST_IMAGE}"
1212

1313
# wait for etcd daemon to bootstrap
1414
sleep 5
1515
}
1616

1717
function runVersionCheck {
18-
Out=$(docker run --rm "${IMAGE}" "${@}")
18+
Out=$(docker run --rm "${TEST_IMAGE}" "${@}")
1919
foundVersion=$(echo "$Out" | head -1 | rev | cut -d" " -f 1 | rev )
2020
if [[ "${foundVersion}" != "${VERSION}" ]]; then
2121
echo "error: Invalid Version. Got $foundVersion, expected $VERSION. Error: $Out"
@@ -45,15 +45,15 @@ else
4545
echo "Terminating test, VERSION not supplied"
4646
exit 1
4747
fi
48-
IMAGE=${IMAGE:-"${REPOSITARY}:${TAG}"}
48+
TEST_IMAGE=${TEST_IMAGE:-"${REPOSITARY}:${TAG}"}
4949

5050
# ETCD related values
5151
RUN_NAME="test_etcd"
5252
KEY="foo"
5353
VALUE="bar"
5454

55-
if [[ "$(docker images -q "${IMAGE}" 2> /dev/null)" == "" ]]; then
56-
echo "${IMAGE} not present locally"
55+
if [[ "$(docker images -q "${TEST_IMAGE}" 2> /dev/null)" == "" ]]; then
56+
echo "${TEST_IMAGE} not present locally"
5757
exit 1
5858
fi
5959

0 commit comments

Comments
 (0)