Changeset 0909c92 in mod_gnutls
- Timestamp:
- Dec 27, 2019, 12:40:51 PM (3 years ago)
- Branches:
- asyncio, main, master, proxy-ticket
- Children:
- 3039495
- Parents:
- 05984a0
- Location:
- test
- Files:
-
- 2 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
test/Makefile.am
r05984a0 r0909c92 58 58 # Python tools for tests 59 59 noinst_PYTHON = https-test-client.py mgstest/http.py mgstest/__init__.py \ 60 mgstest/ services.py mgstest/tests.py runtest.py60 mgstest/hooks.py mgstest/services.py mgstest/tests.py runtest.py 61 61 62 62 # Identities in the miniature CA, server, and client environment for … … 254 254 255 255 EXTRA_DIST = $(apache_data) $(cert_templates) $(shared_identities:=/uid.in) \ 256 apache_service.bash common.bash authority/server/crl.template \ 257 softhsm.bash 256 common.bash authority/server/crl.template softhsm.bash 258 257 259 258 # Lockfile for the main Apache process -
test/runtest.py
r05984a0 r0909c92 22 22 import sys 23 23 24 import mgstest.hooks 24 25 from mgstest import lockfile, TestExpectationFailed 25 26 from mgstest.services import ApacheService, TestService … … 110 111 os.environ['TEST_NAME'] = testname 111 112 113 # Load test case hooks (if any) 114 plugin_path = os.path.join(testdir, 'hooks.py') 115 plugin = mgstest.hooks.load_hooks_plugin(plugin_path) 116 112 117 # PID file name varies depending on whether we're using 113 118 # namespaces. … … 187 192 # Run the test connections 188 193 with contextlib.ExitStack() as stack: 189 test_conf = stack.enter_context(190 open(os.path.join(testdir, 'test.yml'), 'r'))191 194 log_file = None 192 195 output_file = None … … 196 199 output_file = stack.enter_context(open(args.log_responses, 'w')) 197 200 198 run_test_conf(test_conf, 199 float(os.environ.get('TEST_QUERY_TIMEOUT', 5.0)), 200 conn_log=log_file, response_log=output_file) 201 if plugin.run_connection: 202 plugin.run_connection(testname, 203 conn_log=log_file, 204 response_log=output_file) 205 else: 206 test_conf = stack.enter_context( 207 open(os.path.join(testdir, 'test.yml'), 'r')) 208 run_test_conf(test_conf, 209 float(os.environ.get('TEST_QUERY_TIMEOUT', 5.0)), 210 conn_log=log_file, response_log=output_file) 201 211 202 212 # TODO: add hook to replace the test request, e.g. for curl -
test/test-28_HTTP2_support.bash
r05984a0 r0909c92 4 4 5 5 set -e 6 : ${srcdir:="."}7 . ${srcdir}/common.bash8 netns_reexec ${@}9 10 testdir="${srcdir}/tests/28_HTTP2_support"11 TEST_NAME="$(basename ${testdir})"12 . $(dirname ${0})/apache_service.bash13 6 14 7 if [ ! -r ${AP_LIBEXECDIR}/mod_http2.so ]; then … … 21 14 fi 22 15 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 17 log="outputs/28_HTTP2_support.log" 18 output="outputs/28_HTTP2_support.output" 29 19 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}" 37 22 38 23 echo "Checking for HTTP/2 in logged header:" 39 grep "HTTP/2 200" "${ header}"24 grep "HTTP/2 200" "${log}" 40 25 echo "Checking for TLS session status:" 41 26 grep "Current TLS session: (TLS" "${output}" 42 43 apache_service "${testdir}" "apache.conf" stop44 trap - EXIT -
test/tests/Makefile.am
r05984a0 r0909c92 28 28 26_redirect_HTTP_to_HTTPS/apache.conf 26_redirect_HTTP_to_HTTPS/test.yml \ 29 29 27_OCSP_server/apache.conf 27_OCSP_server/ocsp.conf 27_OCSP_server/test.yml \ 30 28_HTTP2_support/apache.conf \30 28_HTTP2_support/apache.conf 28_HTTP2_support/hooks.py \ 31 31 29_force_handshake_vhost/apache.conf 29_force_handshake_vhost/test.yml \ 32 32 30_ip_based_vhosts/apache.conf 30_ip_based_vhosts/test.yml \
Note: See TracChangeset
for help on using the changeset viewer.