Skip to content

Commit

Permalink
Merge pull request #271 from phracek/migrate_to_deployment
Browse files Browse the repository at this point in the history
This PR migrates DeploymentConfig to Deployment.
  • Loading branch information
phracek authored Dec 5, 2023
2 parents 444599a + 47e5953 commit 6c510cd
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 1.22/test/run-openshift-remote-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ source "${THISDIR}/test-lib-remote-openshift.sh"

TEST_LIST="\
test_nginx_integration
test_nginx_local_example
test_nginx_remote_example
test_nginx_template_from_example_app
test_nginx_imagestream
test_latest_imagestreams
"

trap ct_os_cleanup EXIT SIGINT
Expand Down
45 changes: 45 additions & 0 deletions 1.22/test/test-lib-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ source "${THISDIR}/test-lib.sh"
source "${THISDIR}/test-lib-openshift.sh"

function test_nginx_integration() {
if [[ "${VERSION}" == *"micro"* ]]; then
VERSION=$(echo "${VERSION}" | cut -d "-" -f 1)
fi
ct_os_test_s2i_app "${IMAGE_NAME}" \
"https://github.com/sclorg/nginx-container.git" \
"examples/${VERSION}/test-app" \
Expand All @@ -25,4 +28,46 @@ function test_nginx_imagestream() {
"examples/${VERSION}/test-app" \
"Test NGINX passed"
}

function test_nginx_local_example() {
# test local app
ct_os_test_s2i_app ${IMAGE_NAME} "${THISDIR}/test-app" . 'Test NGINX passed'
}

function test_nginx_remote_example() {
# TODO: branch should be changed to master, once code in example app
# stabilizes on with referencing latest version
BRANCH_TO_TEST="master"
# test remote example app
ct_os_test_s2i_app "${IMAGE_NAME}" \
"https://github.com/sclorg/nginx-ex.git" \
. \
'Welcome to your static nginx application on OpenShift'
}

function test_nginx_template_from_example_app() {
BRANCH_TO_TEST="master"
# test template from the example app
ct_os_test_template_app "${IMAGE_NAME}" \
"https://raw.githubusercontent.com/sclorg/nginx-ex/${BRANCH_TO_TEST}/openshift/templates/nginx.json" \
nginx \
'Welcome to your static nginx application on OpenShift' \
8080 http 200 "-p SOURCE_REPOSITORY_REF=master -p NGINX_VERSION=${VERSION} -p NAME=nginx-testing"

}

function test_latest_imagestreams() {
local result=1
if [[ "${VERSION}" == *"micro"* ]]; then
echo "Do not check 'micro' imagestreams. Only main versions."
return 0
fi
# Switch to root directory of a container
echo "Testing the latest version in imagestreams"
pushd "${THISDIR}/../.." >/dev/null || return 1
ct_check_latest_imagestreams
result=$?
popd >/dev/null || return 1
return $result
}
# vim: set tabstop=2:shiftwidth=2:expandtab:
1 change: 1 addition & 0 deletions test/test-lib-nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function test_nginx_template_from_example_app() {
8080 http 200 "-p SOURCE_REPOSITORY_REF=${BRANCH_TO_TEST} -p NGINX_VERSION=${VERSION} -p NAME=nginx-testing"

}

function test_latest_imagestreams() {
local result=1
# Switch to root directory of a container
Expand Down

0 comments on commit 6c510cd

Please sign in to comment.