summaryrefslogtreecommitdiff
path: root/test/modules/http2/test_003_get.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/modules/http2/test_003_get.py')
-rw-r--r--test/modules/http2/test_003_get.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/modules/http2/test_003_get.py b/test/modules/http2/test_003_get.py
index 30f18d3524..5928448d2a 100644
--- a/test/modules/http2/test_003_get.py
+++ b/test/modules/http2/test_003_get.py
@@ -237,3 +237,31 @@ content-type: text/html
assert r.response['status'] == 200
assert 'date' in r.response['header']
assert 'server' in r.response['header']
+
+ # lets do some error tests
+ def test_h2_003_70(self, env):
+ url = env.mkurl("https", "cgi", "/h2test/error?status=500")
+ r = env.curl_get(url)
+ assert r.exit_code == 0, r
+ assert r.response['status'] == 500
+ url = env.mkurl("https", "cgi", "/h2test/error?error=timeout")
+ r = env.curl_get(url)
+ assert r.exit_code == 0, r
+ assert r.response['status'] == 408
+
+ # produce an error during response body
+ def test_h2_003_71(self, env, repeat):
+ 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}"
+ url = env.mkurl("https", "cgi", "/h2test/error?body_error=reset")
+ r = env.curl_get(url)
+ assert r.exit_code != 0, f"{r}"
+
+ # 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")
+ 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}"