Changeset 0909c92 in mod_gnutls for test/test-28_HTTP2_support.bash


Ignore:
Timestamp:
Dec 27, 2019, 12:40:51 PM (17 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, master, proxy-ticket
Children:
3039495
Parents:
05984a0
Message:

Add hooks system to the test runner

With this all tests can use runtest.py to set up their
environment. Note that at the moment only the run_connection hook is
implemented.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test-28_HTTP2_support.bash

    r05984a0 r0909c92  
    44
    55set -e
    6 : ${srcdir:="."}
    7 . ${srcdir}/common.bash
    8 netns_reexec ${@}
    9 
    10 testdir="${srcdir}/tests/28_HTTP2_support"
    11 TEST_NAME="$(basename ${testdir})"
    12 . $(dirname ${0})/apache_service.bash
    136
    147if [ ! -r ${AP_LIBEXECDIR}/mod_http2.so ]; then
     
    2114fi
    2215
    23 function stop_server
    24 {
    25     apache_service "${testdir}" "apache.conf" stop
    26 }
    27 apache_service "${testdir}" "apache.conf" start "${TEST_LOCK}"
    28 trap stop_server EXIT
     16# expected output files
     17log="outputs/28_HTTP2_support.log"
     18output="outputs/28_HTTP2_support.output"
    2919
    30 output="outputs/${TEST_NAME}.output"
    31 header="outputs/${TEST_NAME}.header"
    32 rm -f "${output}" "${header}"
    33 
    34 URL="https://${TEST_HOST}:${TEST_PORT}/status?auto"
    35 ${HTTP_CLI} --http2 --location --verbose --cacert authority/x509.pem \
    36             --dump-header "${header}" --output "${output}" "${URL}"
     20${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 28 \
     21         --log-connection "${log}" --log-responses "${output}"
    3722
    3823echo "Checking for HTTP/2 in logged header:"
    39 grep "HTTP/2 200" "${header}"
     24grep "HTTP/2 200" "${log}"
    4025echo "Checking for TLS session status:"
    4126grep "Current TLS session: (TLS" "${output}"
    42 
    43 apache_service "${testdir}" "apache.conf" stop
    44 trap - EXIT
Note: See TracChangeset for help on using the changeset viewer.