Changeset f84890d in mod_gnutls


Ignore:
Timestamp:
Mar 31, 2015, 8:16:39 AM (8 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, proxy-ticket, upstream
Children:
54aa269
Parents:
6e6a4e4
Message:

Shared bash file for proxy back end management code

Futher test cases for proxy operation will need this code as well, so it makes
sense to keep it in a common file that individual test scripts can parse.

Location:
test
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • test/test-19_TLS_reverse_proxy.bash

    r6e6a4e4 rf84890d  
    33set -e
    44
    5 if [ -z "${BACKEND_HOST}" ]; then
    6     export BACKEND_HOST="localhost"
    7 fi
    8 if [ -z "${BACKEND_IP}" ]; then
    9     export BACKEND_IP="::1"
    10 fi
    11 if [ -z "${BACKEND_PORT}" ]; then
    12     export BACKEND_PORT="9934"
    13 fi
    14 
    15 function backend_apache
    16 {
    17     dir="${1}"
    18     conf="${2}"
    19     action="${3}"
    20     lockfile="${4}"
    21 
    22     if [ -n "${lockfile}" ]; then
    23         flock_cmd="flock -w 10 ${lockfile}"
    24     fi
    25 
    26     TEST_NAME="$(basename "${dir}")"
    27     (
    28         export TEST_NAME
    29         export TEST_IP="${BACKEND_IP}"
    30         export TEST_PORT="${BACKEND_PORT}"
    31         case $action in
    32             start)
    33                 cd "${dir}"
    34                 ${flock_cmd} \
    35                     /usr/sbin/apache2 -f "$(pwd)/${conf}" -k start || return 1
    36                 ;;
    37             stop)
    38                 cd "${dir}"
    39                 /usr/sbin/apache2 -f "$(pwd)/${conf}" -k stop || return 1
    40                 ;;
    41         esac
    42     )
    43 }
    44 
    455testdir="./tests/19_TLS_reverse_proxy"
    46 BACKEND_LOCK="$(realpath ${testdir}/backend.lock)"
     6. ./proxy_backend.bash
    477
    488function stop_backend
Note: See TracChangeset for help on using the changeset viewer.