diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2024-04-04 12:11:13 +0100 |
---|---|---|
committer | andrey-zelenkov <xim.andrew@gmail.com> | 2024-04-10 17:04:30 +0100 |
commit | 626977730f0e9029ee15b6321d35cb5aa311379d (patch) | |
tree | 352b8fa350df62b076003aeb5300728e6525d6f5 | |
parent | 2d7a84684312fc1c46043fa10af0ea336e73f11d (diff) | |
download | unit-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.py | 13 |
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'] |