Skip to content

Commit

Permalink
Merge pull request #394 from sclorg/test_latest_is_distgen
Browse files Browse the repository at this point in the history
Test the latest version in imagestreams
  • Loading branch information
frenzymadness committed Sep 7, 2020
2 parents 5cb7c95 + fb27e7e commit ca9b2dc
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 2 deletions.
1 change: 1 addition & 0 deletions 2.7/test/check_imagestreams.py
12 changes: 12 additions & 0 deletions 2.7/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ test_application() {
cleanup_app
}

test_latest_imagestreams() {
local result=1
info "Testing the latest version in imagestreams"
# Switch to root directory of a container
pushd "${test_dir}/../.." >/dev/null || return 1
ct_check_latest_imagestreams
result=$?
popd >/dev/null || return 1
check_result $result
}

# Since we built the candidate image locally, we don't want S2I attempt to pull
# it from Docker hub
Expand Down Expand Up @@ -224,6 +234,8 @@ for app in ${@:-${WEB_APPS[@]}}; do
# test application with init wrapper
CONTAINER_ARGS="-e ENABLE_INIT_WRAPPER=true" test_application

test_latest_imagestreams

info "All tests for the ${app} finished successfully."
cleanup ${app}
done
Expand Down
1 change: 1 addition & 0 deletions 3.6/test/check_imagestreams.py
12 changes: 12 additions & 0 deletions 3.6/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ test_application() {
cleanup_app
}

test_latest_imagestreams() {
local result=1
info "Testing the latest version in imagestreams"
# Switch to root directory of a container
pushd "${test_dir}/../.." >/dev/null || return 1
ct_check_latest_imagestreams
result=$?
popd >/dev/null || return 1
check_result $result
}

# Since we built the candidate image locally, we don't want S2I attempt to pull
# it from Docker hub
Expand Down Expand Up @@ -224,6 +234,8 @@ for app in ${@:-${WEB_APPS[@]}}; do
# test application with init wrapper
CONTAINER_ARGS="-e ENABLE_INIT_WRAPPER=true" test_application

test_latest_imagestreams

info "All tests for the ${app} finished successfully."
cleanup ${app}
done
Expand Down
1 change: 1 addition & 0 deletions 3.7/test/check_imagestreams.py
12 changes: 12 additions & 0 deletions 3.7/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ test_application() {
cleanup_app
}

test_latest_imagestreams() {
local result=1
info "Testing the latest version in imagestreams"
# Switch to root directory of a container
pushd "${test_dir}/../.." >/dev/null || return 1
ct_check_latest_imagestreams
result=$?
popd >/dev/null || return 1
check_result $result
}

# Since we built the candidate image locally, we don't want S2I attempt to pull
# it from Docker hub
Expand Down Expand Up @@ -224,6 +234,8 @@ for app in ${@:-${WEB_APPS[@]}}; do
# test application with init wrapper
CONTAINER_ARGS="-e ENABLE_INIT_WRAPPER=true" test_application

test_latest_imagestreams

info "All tests for the ${app} finished successfully."
cleanup ${app}
done
Expand Down
1 change: 1 addition & 0 deletions 3.8/test/check_imagestreams.py
12 changes: 12 additions & 0 deletions 3.8/test/run
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,16 @@ test_application() {
cleanup_app
}

test_latest_imagestreams() {
local result=1
info "Testing the latest version in imagestreams"
# Switch to root directory of a container
pushd "${test_dir}/../.." >/dev/null || return 1
ct_check_latest_imagestreams
result=$?
popd >/dev/null || return 1
check_result $result
}

# Since we built the candidate image locally, we don't want S2I attempt to pull
# it from Docker hub
Expand Down Expand Up @@ -224,6 +234,8 @@ for app in ${@:-${WEB_APPS[@]}}; do
# test application with init wrapper
CONTAINER_ARGS="-e ENABLE_INIT_WRAPPER=true" test_application

test_latest_imagestreams

info "All tests for the ${app} finished successfully."
cleanup ${app}
done
Expand Down
2 changes: 1 addition & 1 deletion common
2 changes: 1 addition & 1 deletion examples/npm-virtualenv-uwsgi-test-app/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ packages=("pip" "setuptools" "wheel")
for pkg in ${packages[@]}; do
# grep returns exit code 1 if the output contains only one line starting
# with "Requirement already …" which means that the package is updated
python -m pip install -U --no-python-version-warning $pkg 2>&1 | grep -v "^Requirement already up-to-date: "
python -m pip install -U --no-deps --no-python-version-warning $pkg 2>&1 | grep -v "^Requirement already up-to-date: "
if [ $? -eq 0 ]; then
echo "ERROR: Failed to upgrade '$pkg' to the latest version."
exit 1
Expand Down
3 changes: 3 additions & 0 deletions manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ SYMLINK_RULES="
link_target=../../imagestreams
link_name=test/imagestreams;
link_target=../../common/check_imagestreams.py
link_name=test/check_imagestreams.py;
"

# Files to copy
Expand Down
1 change: 1 addition & 0 deletions test/check_imagestreams.py
12 changes: 12 additions & 0 deletions test/run
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ test_application() {
cleanup_app
}

test_latest_imagestreams() {
local result=1
info "Testing the latest version in imagestreams"
# Switch to root directory of a container
pushd "${test_dir}/../.." >/dev/null || return 1
ct_check_latest_imagestreams
result=$?
popd >/dev/null || return 1
check_result $result
}

# Since we built the candidate image locally, we don't want S2I attempt to pull
# it from Docker hub
Expand Down Expand Up @@ -225,6 +235,8 @@ for app in ${@:-${WEB_APPS[@]}}; do
# test application with init wrapper
CONTAINER_ARGS="-e ENABLE_INIT_WRAPPER=true" test_application

test_latest_imagestreams

info "All tests for the ${app} finished successfully."
cleanup ${app}
done
Expand Down

0 comments on commit ca9b2dc

Please sign in to comment.