mirror of
https://github.com/curl/curl.git
synced 2026-08-12 15:30:57 +03:00
pytest: skip H2 tests if feature missing from curl
To allow running pytests on more curl configurations. Also delete a redundant H3 feature check from test_17_14_expired_cert. Cherry-picked from #19407 Closes #19412
This commit is contained in:
parent
7e0d4dd4a8
commit
3752de465d
16 changed files with 294 additions and 2 deletions
|
|
@ -40,6 +40,8 @@ class TestErrors:
|
|||
# download 1 file, check that we get CURLE_PARTIAL_FILE
|
||||
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
|
||||
def test_05_01_partial_1(self, env: Env, httpd, nghttpx, proto):
|
||||
if proto == 'h2' and not env.have_h2_curl():
|
||||
pytest.skip("h2 not supported")
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
count = 1
|
||||
|
|
@ -60,6 +62,8 @@ class TestErrors:
|
|||
# download files, check that we get CURLE_PARTIAL_FILE for all
|
||||
@pytest.mark.parametrize("proto", ['h2', 'h3'])
|
||||
def test_05_02_partial_20(self, env: Env, httpd, nghttpx, proto):
|
||||
if proto == 'h2' and not env.have_h2_curl():
|
||||
pytest.skip("h2 not supported")
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
if proto == 'h3' and env.curl_uses_ossl_quic():
|
||||
|
|
@ -82,6 +86,8 @@ class TestErrors:
|
|||
|
||||
# access a resource that, on h2, RST the stream with HTTP_1_1_REQUIRED
|
||||
def test_05_03_required(self, env: Env, httpd, nghttpx):
|
||||
if not env.have_h2_curl():
|
||||
pytest.skip("h2 not supported")
|
||||
curl = CurlClient(env=env)
|
||||
proto = 'http/1.1'
|
||||
urln = f'https://{env.authority_for(env.domain1, proto)}/curltest/1_1'
|
||||
|
|
@ -107,6 +113,8 @@ class TestErrors:
|
|||
# and not see the "unclean" close either
|
||||
@pytest.mark.parametrize("proto", ['http/1.0', 'http/1.1', 'h2'])
|
||||
def test_05_04_unclean_tls_shutdown(self, env: Env, httpd, nghttpx, proto):
|
||||
if proto == 'h2' and not env.have_h2_curl():
|
||||
pytest.skip("h2 not supported")
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
count = 10 if proto == 'h2' else 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue