summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2024-04-04 12:11:13 +0100
committerandrey-zelenkov <xim.andrew@gmail.com>2024-04-10 17:04:30 +0100
commit626977730f0e9029ee15b6321d35cb5aa311379d (patch)
tree352b8fa350df62b076003aeb5300728e6525d6f5
parent2d7a84684312fc1c46043fa10af0ea336e73f11d (diff)
downloadunit-626977730f0e9029ee15b6321d35cb5aa311379d.tar.gz
unit-626977730f0e9029ee15b6321d35cb5aa311379d.tar.bz2
Tests: error report corrected for unknown variables in "response_headers"
For more information please see https://github.com/nginx/unit/pull/1191
-rw-r--r--test/test_response_headers.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/test_response_headers.py b/test/test_response_headers.py
index e62c1293..ddc22124 100644
--- a/test/test_response_headers.py
+++ b/test/test_response_headers.py
@@ -163,12 +163,11 @@ def test_response_headers_remove():
def test_response_headers_invalid(skip_alert):
- skip_alert(r'failed to apply new conf')
-
def check_invalid(conf):
- assert 'error' in client.conf(
- conf,
- 'routes/0/action/response_headers',
- )
+ resp = client.conf(conf, 'routes/0/action/response_headers')
+ assert 'error' in resp
+
+ return resp
- check_invalid({"X-Foo": "$u"})
+ resp = check_invalid({"X-Foo": "$u"})
+ assert 'detail' in resp and 'Unknown variable' in resp['detail']