Changeset 0f52d48 in mod_gnutls for test/tests/28_HTTP2_support


Ignore:
Timestamp:
Jan 8, 2020, 5:06:31 PM (11 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
482bafc
Parents:
baa0056
Message:

Switch most tests to hooks.py instead of preconditions in test scripts

The new function mgstest.require_apache_modules() covers required
Apache modules, the rest is individual stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/tests/28_HTTP2_support/hooks.py

    rbaa0056 r0f52d48  
    22import re
    33import subprocess
    4 from mgstest import require_match
     4from mgstest import require_apache_modules, require_match
     5from unittest import SkipTest
     6
     7def 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!')
    516
    617def run_connection(testname, conn_log, response_log):
     18    """Check if HTTP/2 connections using mod_gnutls and mod_http2 work."""
     19
    720    url = f'https://{os.environ["TEST_HOST"]}:{os.environ["TEST_PORT"]}' \
    821        '/status?auto'
Note: See TracChangeset for help on using the changeset viewer.