Skip to content

Commit

Permalink
Tests: error report corrected for unknown variables in "response_head…
Browse files Browse the repository at this point in the history
…ers"

For more information please see nginx#1191
  • Loading branch information
andrey-zelenkov committed Apr 10, 2024
1 parent 4b64ccb commit 14b3112
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/test_response_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

0 comments on commit 14b3112

Please sign in to comment.