Changeset 0f52d48 in mod_gnutls
- Timestamp:
- Jan 8, 2020, 5:06:31 PM (3 years ago)
- Branches:
- asyncio, main, master, proxy-ticket
- Children:
- 482bafc
- Parents:
- baa0056
- Location:
- test
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/__init__.py
rbaa0056 r0f52d48 18 18 19 19 import fcntl 20 import os 21 import os.path 20 22 import sys 21 23 22 24 from contextlib import contextmanager 25 from unittest import SkipTest 23 26 24 27 class TestExpectationFailed(Exception): … … 88 91 else: 89 92 raise TestExpectationFailed(f'No match found for {regexp.pattern}!') 93 94 95 96 def require_apache_modules(*modules): 97 """Raise unittest.SkipTest if any of the given module files (full file 98 name) is not present in AP_LIBEXECDIR. 99 100 """ 101 mod_dir = os.environ['AP_LIBEXECDIR'] 102 for mod in modules: 103 if not os.path.isfile(os.path.join(mod_dir, mod)): 104 raise SkipTest(f'{mod} not found, skipping.') -
test/test-27_OCSP_server.bash
rbaa0056 r0f52d48 1 1 #!/bin/bash 2 3 # Skip if OCSP tests are not enabled4 [ -n "${OCSP_PORT}" ] || exit 775 6 2 . ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 27 -
test/test-28_HTTP2_support.bash
rbaa0056 r0f52d48 1 1 #!/bin/bash 2 #3 # Check if HTTP/2 connections using mod_gnutls and mod_http2 work4 5 set -e6 7 if [ ! -r ${AP_LIBEXECDIR}/mod_http2.so ]; then8 echo "mod_http2.so not found, skipping." 2>&19 exit 7710 elif [ "$(basename ${HTTP_CLI})" != "curl" ] \11 || ! ${HTTP_CLI} -V | grep -P '\sHTTP2($|\s)'; then12 echo "Curl not found or does not support HTTP/2, skipping." 2>&113 exit 7714 fi15 16 2 . ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 28 -
test/test-34_TLS_reverse_proxy_h2.bash
rbaa0056 r0f52d48 1 1 #!/bin/bash 2 for mod in mod_http2.so mod_proxy_http2.so; do3 if [ ! -r "${AP_LIBEXECDIR}/${mod}" ]; then4 echo "${mod} not found, skipping." 2>&15 exit 776 fi7 done8 2 . ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 34 -
test/tests/27_OCSP_server/hooks.py
rbaa0056 r0f52d48 1 import os 1 2 import re 2 3 from mgstest import require_match 4 from unittest import SkipTest 5 6 def prepare_env(): 7 if not 'OCSP_PORT' in os.environ: 8 raise SkipTest('OCSP_PORT is not set, check if openssl is available.') 3 9 4 10 def post_check(conn_log, response_log): -
test/tests/28_HTTP2_support/hooks.py
rbaa0056 r0f52d48 2 2 import re 3 3 import subprocess 4 from mgstest import require_match 4 from mgstest import require_apache_modules, require_match 5 from unittest import SkipTest 6 7 def prepare_env(): 8 require_apache_modules('mod_http2.so') 9 curl = os.environ['HTTP_CLI'] 10 if curl == 'no': 11 raise SkipTest(f'{curl} not found!') 12 proc = subprocess.run([curl, '-V'], stdout=subprocess.PIPE, 13 check=True, text=True) 14 if not re.search(r'\bHTTP2\b', proc.stdout): 15 raise SkipTest(f'{curl} does not support HTTP/2!') 5 16 6 17 def run_connection(testname, conn_log, response_log): 18 """Check if HTTP/2 connections using mod_gnutls and mod_http2 work.""" 19 7 20 url = f'https://{os.environ["TEST_HOST"]}:{os.environ["TEST_PORT"]}' \ 8 21 '/status?auto' -
test/tests/Makefile.am
rbaa0056 r0f52d48 34 34 32_vhost_SNI_serveralias_mismatch/apache.conf 32_vhost_SNI_serveralias_mismatch/test.yml \ 35 35 33_vhost_SNI_serveralias_missinghost/apache.conf 33_vhost_SNI_serveralias_missinghost/test.yml \ 36 34_TLS_reverse_proxy_h2/apache.conf 34_TLS_reverse_proxy_h2/ backend.conf 34_TLS_reverse_proxy_h2/test.yml36 34_TLS_reverse_proxy_h2/apache.conf 34_TLS_reverse_proxy_h2/hooks.py 34_TLS_reverse_proxy_h2/backend.conf 34_TLS_reverse_proxy_h2/test.yml
Note: See TracChangeset
for help on using the changeset viewer.