diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/modules/http2/env.py | 5 | ||||
-rw-r--r-- | test/modules/http2/test_105_timeout.py | 1 | ||||
-rw-r--r-- | test/modules/http2/test_202_trailer.py | 24 | ||||
-rwxr-xr-x | test/modules/md/conftest.py | 1 | ||||
-rw-r--r-- | test/pyhttpd/conf.py | 2 |
5 files changed, 18 insertions, 15 deletions
diff --git a/test/modules/http2/env.py b/test/modules/http2/env.py index fee672bd2b..8b2d54230c 100644 --- a/test/modules/http2/env.py +++ b/test/modules/http2/env.py @@ -64,7 +64,7 @@ class H2TestEnv(HttpdTestEnv): "H2MaxWorkers 64", "Protocols h2 http/1.1 h2c", ]) - self.add_httpd_log_modules(["http2", "proxy_http2", "h2test"]) + self.add_httpd_log_modules(["http2", "proxy_http2", "h2test", "proxy", "proxy_http"]) self.add_cert_specs([ CertificateSpec(domains=[ f"push.{self._http_tld}", @@ -86,6 +86,9 @@ class H2TestEnv(HttpdTestEnv): 'AH00135', 'AH02261', # Re-negotiation handshake failed (our test_101) 'AH03490', # scoreboard full, happens on limit tests + 'AH02429', # invalid chars in response header names, see test_h2_200 + 'AH02430', # invalid chars in response header values, see test_h2_200 + 'AH10373', # SSL errors on uncompleted handshakes, see test_h2_105 ]) self.httpd_error_log.add_ignored_patterns([ re.compile(r'.*malformed header from script \'hecho.py\': Bad header: x.*'), diff --git a/test/modules/http2/test_105_timeout.py b/test/modules/http2/test_105_timeout.py index 24133ae52c..3b030cdd0d 100644 --- a/test/modules/http2/test_105_timeout.py +++ b/test/modules/http2/test_105_timeout.py @@ -44,6 +44,7 @@ class TestTimeout: sock.close() # Check that mod_reqtimeout handshake setting takes effect + @pytest.mark.skip(reason="SSL handshake timeout currently broken") def test_h2_105_02(self, env): conf = H2Conf(env) conf.add(""" diff --git a/test/modules/http2/test_202_trailer.py b/test/modules/http2/test_202_trailer.py index 57bcff77f5..ae3d8970b3 100644 --- a/test/modules/http2/test_202_trailer.py +++ b/test/modules/http2/test_202_trailer.py @@ -26,40 +26,40 @@ class TestTrailers: url = env.mkurl("https", "cgi", "/echo.py") fpath = os.path.join(env.gen_dir, "data-1k") r = env.nghttp().upload(url, fpath, options=["--trailer", "test: 1"]) - assert 300 > r.response["status"] - assert 1000 == len(r.response["body"]) + assert r.response["status"] < 300 + assert len(r.response["body"]) == 1000 r = env.nghttp().upload(url, fpath, options=["--trailer", "test: 1b", "--trailer", "XXX: test"]) - assert 300 > r.response["status"] - assert 1000 == len(r.response["body"]) + assert r.response["status"] < 300 + assert len(r.response["body"]) == 1000 # check if the server survives a trailer without content-length def test_h2_202_02(self, env): url = env.mkurl("https", "cgi", "/echo.py") fpath = os.path.join(env.gen_dir, "data-1k") r = env.nghttp().upload(url, fpath, options=["--trailer", "test: 2", "--no-content-length"]) - assert 300 > r.response["status"] - assert 1000 == len(r.response["body"]) + assert r.response["status"] < 300 + assert len(r.response["body"]) == 1000 # check if echoing request headers in response from GET works def test_h2_202_03(self, env): url = env.mkurl("https", "cgi", "/echohd.py?name=X") r = env.nghttp().get(url, options=["--header", "X: 3"]) - assert 300 > r.response["status"] - assert b"X: 3\n" == r.response["body"] + assert r.response["status"] < 300 + assert r.response["body"] == b"X: 3\n" # check if echoing request headers in response from POST works def test_h2_202_03b(self, env): url = env.mkurl("https", "cgi", "/echohd.py?name=X") r = env.nghttp().post_name(url, "Y", options=["--header", "X: 3b"]) - assert 300 > r.response["status"] - assert b"X: 3b\n" == r.response["body"] + assert r.response["status"] < 300 + assert r.response["body"] == b"X: 3b\n" # check if echoing request headers in response from POST works, but trailers are not seen # This is the way CGI invocation works. def test_h2_202_04(self, env): url = env.mkurl("https", "cgi", "/echohd.py?name=X") r = env.nghttp().post_name(url, "Y", options=["--header", "X: 4a", "--trailer", "X: 4b"]) - assert 300 > r.response["status"] - assert b"X: 4a\n" == r.response["body"] + assert r.response["status"] < 300 + assert r.response["body"] == b"X: 4a\n" diff --git a/test/modules/md/conftest.py b/test/modules/md/conftest.py index fc3206db10..146d0316b9 100755 --- a/test/modules/md/conftest.py +++ b/test/modules/md/conftest.py @@ -50,6 +50,7 @@ def _session_scope(env): 'AH01909', # mod_ssl, cert alt name complains 'AH10170', # mod_md, wrong config, tested 'AH10171', # mod_md, wrong config, tested + 'AH10373', # SSL errors on uncompleted handshakes ]) env.httpd_error_log.add_ignored_patterns([ diff --git a/test/pyhttpd/conf.py b/test/pyhttpd/conf.py index a2eeab9bfe..5b5b4ec271 100644 --- a/test/pyhttpd/conf.py +++ b/test/pyhttpd/conf.py @@ -171,8 +171,6 @@ class HttpdConf(object): self.add("AddHandler cgi-script .py") self.add_proxies("cgi", proxy_self=proxy_self, h2proxy_self=h2proxy_self) self.end_vhost() - self.add("LogLevel proxy:info") - self.add("LogLevel proxy_http:info") return self @staticmethod |