From 626977730f0e9029ee15b6321d35cb5aa311379d Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Thu, 4 Apr 2024 12:11:13 +0100 Subject: Tests: error report corrected for unknown variables in "response_headers" For more information please see https://github.com/nginx/unit/pull/1191 --- test/test_response_headers.py | 13 ++++++------- 1 file 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'] -- cgit