nodejs/test/run-openshift-remote-cluster
phracek 5bfde53a71 Merge pull request #340 from zmiklank/exit_oc_tests_if_login_fails
Exit oc tests gracefully if login fails
2022-06-10 08:44:57 +00:00

49 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
#
# Test the NodeJS image in OpenShift.
#
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
THISDIR=$(dirname ${BASH_SOURCE[0]})
source "${THISDIR}/test-lib.sh"
source "${THISDIR}/test-lib-openshift.sh"
source "${THISDIR}/test-lib-nodejs.sh"
source "${THISDIR}/test-lib-remote-openshift.sh"
TEST_LIST="\
test_nodejs_s2i_container
test_nodejs_s2i_app_ex
test_nodejs_s2i_templates
test_nodejs_imagestream
"
# change the branch to a different value if a new change in the example
# app needs to be tested
BRANCH_TO_TEST=master
trap ct_os_cleanup EXIT SIGINT
ct_os_set_ocp4
ct_os_check_compulsory_vars
ct_os_check_login || exit 1
set -u
test -n "${IMAGE_NAME-}" || false 'make sure $IMAGE_NAME is defined'
test -n "${VERSION-}" || false 'make sure $VERSION is defined'
# For testing on OpenShift 4 we use internal registry
export CT_OCP4_TEST=true
export CT_SKIP_UPLOAD_IMAGE=true
TEST_SUMMARY=''
TEST_SET=${TESTS:-$TEST_LIST} ct_run_tests_from_testset "openshift-remote-cluster"
# vim: set tabstop=2:shiftwidth=2:expandtab: