mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:33:33 +03:00
pytest: adapt for runs with openssl-1.1.1
Fix use of nghttpx fixture to be present even when h3 is not available in curl. Fix TLS protocol versions expectations for older openssl versions. Closes #17538
This commit is contained in:
parent
5d9f425302
commit
d9bebede59
5 changed files with 70 additions and 22 deletions
|
|
@ -36,6 +36,8 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '.'))
|
|||
|
||||
from testenv import Env, Nghttpx, Httpd, NghttpxQuic, NghttpxFwd
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def pytest_report_header(config):
|
||||
# Env inits its base properties only once, we can report them here
|
||||
|
|
@ -109,7 +111,9 @@ def httpd(env) -> Generator[Httpd, None, None]:
|
|||
@pytest.fixture(scope='session')
|
||||
def nghttpx(env, httpd) -> Generator[Union[Nghttpx,bool], None, None]:
|
||||
nghttpx = NghttpxQuic(env=env)
|
||||
if nghttpx.exists() and env.have_h3():
|
||||
if nghttpx.exists():
|
||||
if not nghttpx.supports_h3() and env.have_h3_curl():
|
||||
log.warning('nghttpx does not support QUIC, but curl does')
|
||||
nghttpx.clear_logs()
|
||||
assert nghttpx.initial_start()
|
||||
yield nghttpx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue