[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-cvs
Subject: svn commit: r1910701 - in /httpd/httpd/trunk/test/modules/http2: test_003_get.py test_004_post.py te
From: icing () apache ! org
Date: 2023-06-30 8:16:25
Message-ID: 20230630081625.86D2617B3CE () svn01-us-east ! apache ! org
[Download RAW message or body]
Author: icing
Date: Fri Jun 30 08:16:25 2023
New Revision: 1910701
URL: http://svn.apache.org/viewvc?rev=1910701&view=rev
Log:
tests: sync mod_http2 tests with mod_h2 and 2.4.x version checks
Modified:
httpd/httpd/trunk/test/modules/http2/test_003_get.py
httpd/httpd/trunk/test/modules/http2/test_004_post.py
httpd/httpd/trunk/test/modules/http2/test_106_shutdown.py
httpd/httpd/trunk/test/modules/http2/test_401_early_hints.py
httpd/httpd/trunk/test/modules/http2/test_600_h2proxy.py
httpd/httpd/trunk/test/modules/http2/test_601_h2proxy_twisted.py
Modified: httpd/httpd/trunk/test/modules/http2/test_003_get.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_003_get.py?rev=1910701&r1=1910700&r2=1910701&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_003_get.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_003_get.py Fri Jun 30 08:16:25 2023
@@ -251,7 +251,8 @@ content-type: text/html
# produce an error during response body
def test_h2_003_71(self, env, repeat):
- pytest.skip("needs fix in core protocol handling")
+ if env.httpd_is_at_least('2.5.0'):
+ pytest.skip("needs fix in core protocol handling")
url = env.mkurl("https", "cgi", "/h2test/error?body_error=timeout")
r = env.curl_get(url)
assert r.exit_code != 0, f"{r}"
@@ -261,7 +262,8 @@ content-type: text/html
# produce an error, fail to generate an error bucket
def test_h2_003_72(self, env, repeat):
- pytest.skip("needs fix in core protocol handling")
+ if env.httpd_is_at_least('2.5.0'):
+ pytest.skip("needs fix in core protocol handling")
url = env.mkurl("https", "cgi", \
"/h2test/error?body_error=timeout&error_bucket=0") r = env.curl_get(url)
assert r.exit_code != 0, f"{r}"
Modified: httpd/httpd/trunk/test/modules/http2/test_004_post.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_004_post.py?rev=1910701&r1=1910700&r2=1910701&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_004_post.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_004_post.py Fri Jun 30 08:16:25 2023
@@ -18,8 +18,15 @@ class TestPost:
@pytest.fixture(autouse=True, scope='class')
def _class_scope(self, env):
TestPost._local_dir = os.path.dirname(inspect.getfile(TestPost))
- conf = H2Conf(env)
- conf.add_vhost_cgi(proxy_self=True, h2proxy_self=True).install()
+ conf = H2Conf(env, extras={
+ f'cgi.{env.http_tld}': [
+ f'<Directory {env.server_docs_dir}/cgi/xxx>',
+ ' RewriteEngine On',
+ ' RewriteRule .* /proxy/echo.py [QSA]',
+ '</Directory>',
+ ]
+ })
+ conf.add_vhost_cgi(proxy_self=True).install()
assert env.apache_restart() == 0
def local_src(self, fname):
@@ -183,16 +190,6 @@ class TestPost:
def test_h2_004_41(self, env):
# reproduce PR66597, double chunked encoding on redirects
- conf = H2Conf(env, extras={
- f'cgi.{env.http_tld}': [
- f'<Directory {env.server_docs_dir}/cgi/xxx>',
- ' RewriteEngine On',
- ' RewriteRule .* /proxy/echo.py [QSA]',
- '</Directory>',
- ]
- })
- conf.add_vhost_cgi(proxy_self=True).install()
- assert env.apache_restart() == 0
url = env.mkurl("https", "cgi", "/xxx/test.json")
r = env.curl_post_data(url, data="0123456789", options=[])
assert r.exit_code == 0
Modified: httpd/httpd/trunk/test/modules/http2/test_106_shutdown.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_106_shutdown.py?rev=1910701&r1=1910700&r2=1910701&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_106_shutdown.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_106_shutdown.py Fri Jun 30 08:16:25 \
2023 @@ -66,7 +66,7 @@ class TestShutdown:
r = env.curl_get(url, options=['-v'])
# requests should succeed, but rarely connections get closed
# before the response is received
- if r.exit_code == 55:
+ if r.exit_code in [16, 55]:
# curl send error
assert r.response is None
else:
Modified: httpd/httpd/trunk/test/modules/http2/test_401_early_hints.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_401_early_hints.py?rev=1910701&r1=1910700&r2=1910701&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_401_early_hints.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_401_early_hints.py Fri Jun 30 08:16:25 \
2023 @@ -9,6 +9,8 @@ class TestEarlyHints:
@pytest.fixture(autouse=True, scope='class')
def _class_scope(self, env):
+ if not env.httpd_is_at_least('2.4.58'):
+ pytest.skip(f'needs httpd 2.4.58')
H2Conf(env).start_vhost(domains=[f"hints.{env.http_tld}"],
port=env.https_port, doc_root="htdocs/test1"
).add("""
@@ -67,6 +69,8 @@ class TestEarlyHints:
# H2EarlyHints enabled, no PUSH, check that it works for H2EarlyHint
def test_h2_401_34(self, env, repeat):
+ if not env.httpd_is_at_least('2.4.58'):
+ pytest.skip(f'needs httpd 2.4.58')
url = env.mkurl("https", "hints", "/006-early-no-push.html")
r = env.nghttp().get(url)
assert r.response["status"] == 200
Modified: httpd/httpd/trunk/test/modules/http2/test_600_h2proxy.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_600_h2proxy.py?rev=1910701&r1=1910700&r2=1910701&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_600_h2proxy.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_600_h2proxy.py Fri Jun 30 08:16:25 2023
@@ -153,7 +153,8 @@ class TestH2Proxy:
# produce an error during response body
def test_h2_600_31(self, env, repeat):
- pytest.skip("needs fix in core protocol handling")
+ if env.httpd_is_at_least('2.5.0'):
+ pytest.skip("needs fix in core protocol handling")
conf = H2Conf(env)
conf.add_vhost_cgi(h2proxy_self=True)
conf.install()
@@ -163,11 +164,12 @@ class TestH2Proxy:
# depending on when the error is detect in proxying, if may RST the
# stream (exit_code != 0) or give a 503 response.
if r.exit_code == 0:
- assert r.response['status'] == 503
+ assert r.response['status'] == 502
# produce an error, fail to generate an error bucket
def test_h2_600_32(self, env, repeat):
- pytest.skip("needs fix in core protocol handling")
+ if env.httpd_is_at_least('2.5.0'):
+ pytest.skip("needs fix in core protocol handling")
conf = H2Conf(env)
conf.add_vhost_cgi(h2proxy_self=True)
conf.install()
Modified: httpd/httpd/trunk/test/modules/http2/test_601_h2proxy_twisted.py
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/modules/http2/test_601_h2proxy_twisted.py?rev=1910701&r1=1910700&r2=1910701&view=diff
==============================================================================
--- httpd/httpd/trunk/test/modules/http2/test_601_h2proxy_twisted.py (original)
+++ httpd/httpd/trunk/test/modules/http2/test_601_h2proxy_twisted.py Fri Jun 30 \
08:16:25 2023 @@ -45,6 +45,8 @@ class TestH2ProxyTwisted:
"data-1k", "data-10k", "data-100k", "data-1m",
])
def test_h2_601_03_echo_fail_early(self, env, name):
+ if not env.httpd_is_at_least('2.4.58'):
+ pytest.skip(f'needs httpd 2.4.58')
fpath = os.path.join(env.gen_dir, name)
url = env.mkurl("https", "cgi", "/h2proxy/h2test/echo?fail_after=512")
r = env.curl_upload(url, fpath, options=[])
@@ -55,6 +57,8 @@ class TestH2ProxyTwisted:
"data-1k", "data-10k", "data-100k", "data-1m",
])
def test_h2_601_04_echo_fail_late(self, env, name):
+ if not env.httpd_is_at_least('2.4.58'):
+ pytest.skip(f'needs httpd 2.4.58')
fpath = os.path.join(env.gen_dir, name)
url = env.mkurl("https", "cgi", \
f"/h2proxy/h2test/echo?fail_after={os.path.getsize(fpath)}") r = \
env.curl_upload(url, fpath, options=[]) @@ -62,6 +66,8 @@ class TestH2ProxyTwisted:
assert r.exit_code == 92 or r.response["status"] == 502
def test_h2_601_05_echo_fail_many(self, env):
+ if not env.httpd_is_at_least('2.4.58'):
+ pytest.skip(f'needs httpd 2.4.58')
if not env.curl_is_at_least('8.0.0'):
pytest.skip(f'need at least curl v8.0.0 for this')
count = 200
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic