debian/masterdebian/stretch-backportsjessie-backportsupstream
Last change
on this file since 39bd695 was
ed82a6a,
checked in by Thomas Klute <thomas2.klute@…>, 5 years ago
|
Two more test cases for TLS reverse proxy and test locking fix
New test cases:
20: TLS reverse proxy with TLS client authentication between proxy and back end
server, otherwise the same as test case 19.
21: TLS reverse proxy scenario with the back end server presenting an imposter
certificate. The proxy must abort the connection and send an error message to
the client.
Bugfix: Each proxy test case used a lock file in its own test directory to protect
the back end server instance. Obviously, locking is only useful if the lock file
is shared between all potentially conflicting instances, thus it is moved to the
main test suite directory.
|
-
Property mode set to
100644
|
File size:
885 bytes
|
Rev | Line | |
---|
[f84890d] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | set -e |
---|
| 4 | |
---|
| 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 | if [ -z "${BACKEND_LOCK}" ] && [ -n "${testdir}" ]; then |
---|
[ed82a6a] | 15 | BACKEND_LOCK="$(realpath ${testdir}/../../backend.lock)" |
---|
[f84890d] | 16 | fi |
---|
| 17 | |
---|
| 18 | function backend_apache |
---|
| 19 | { |
---|
| 20 | dir="${1}" |
---|
| 21 | conf="${2}" |
---|
| 22 | action="${3}" |
---|
| 23 | lockfile="${4}" |
---|
| 24 | |
---|
| 25 | if [ -n "${lockfile}" ]; then |
---|
| 26 | flock_cmd="flock -w 10 ${lockfile}" |
---|
| 27 | fi |
---|
| 28 | |
---|
| 29 | TEST_NAME="$(basename "${dir}")" |
---|
| 30 | ( |
---|
| 31 | export TEST_NAME |
---|
| 32 | export TEST_IP="${BACKEND_IP}" |
---|
| 33 | export TEST_PORT="${BACKEND_PORT}" |
---|
| 34 | case $action in |
---|
| 35 | start) |
---|
| 36 | cd "${dir}" |
---|
| 37 | ${flock_cmd} \ |
---|
| 38 | /usr/sbin/apache2 -f "$(pwd)/${conf}" -k start || return 1 |
---|
| 39 | ;; |
---|
| 40 | stop) |
---|
| 41 | cd "${dir}" |
---|
| 42 | /usr/sbin/apache2 -f "$(pwd)/${conf}" -k stop || return 1 |
---|
| 43 | ;; |
---|
| 44 | esac |
---|
| 45 | ) |
---|
| 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.