Skip to content

Commit

Permalink
Merge pull request #211 from ashu-011/debug_mode
Browse files Browse the repository at this point in the history
Add Horizontest debug mode for test-operator
  • Loading branch information
openshift-merge-bot[bot] authored Sep 23, 2024
2 parents 3a65137 + 85bc0dc commit 190096c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions container-images/tcib/base/os/horizontest/run_horizontest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ GROUP_NAME=admins
SELENIUM_EXPLICIT_WAIT=180
SELENIUM_PAGE_TIMEOUT=120
SELENIUM_IMPLICIT_WAIT=30
HORIZONTEST_DEBUG_MODE="${HORIZONTEST_DEBUG_MODE:-false}"

# assert mandatory variables have been set
[[ -z ${ADMIN_USERNAME} ]] && echo "ADMIN_USERNAME not set" && exit 1
Expand All @@ -25,6 +26,16 @@ SELENIUM_IMPLICIT_WAIT=30
[[ -z ${REPO_URL} ]] && REPO_URL="https://review.opendev.org/openstack/horizon"
[[ -z ${HORIZON_REPO_BRANCH} ]] && HORIZON_REPO_BRANCH="master"

function catch_error_if_debug {
echo "File run_horizontest.sh has run into an error!"
sleep infinity
}

# Catch errors when in debug mode
if [ ${HORIZONTEST_DEBUG_MODE} == true ]; then
trap catch_error_if_debug ERR
fi

#This function is temporarily added until tempest cleanup is implemented
function clean_leftover_images {
openstack image list -c Name -f value --os-cloud default | xargs -I {} openstack image delete {} --os-cloud default
Expand Down Expand Up @@ -141,4 +152,9 @@ cp -rf ${HORIZONTEST_DIR}/horizon/test_reports/* ${LOG_DIR}

delete_custom_resources

# Keep pod in running state when in debug mode
if [ ${HORIZONTEST_DEBUG_MODE} == true ]; then
sleep infinity
fi

exit ${RETURN_VALUE}

0 comments on commit 190096c

Please sign in to comment.