Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Commit 6269777

Browse files
Tests: error report corrected for unknown variables in "response_headers"
For more information please see #1191
1 parent 2d7a846 commit 6269777

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/test_response_headers.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,11 @@ def test_response_headers_remove():
163163

164164

165165
def test_response_headers_invalid(skip_alert):
166-
skip_alert(r'failed to apply new conf')
167-
168166
def check_invalid(conf):
169-
assert 'error' in client.conf(
170-
conf,
171-
'routes/0/action/response_headers',
172-
)
167+
resp = client.conf(conf, 'routes/0/action/response_headers')
168+
assert 'error' in resp
169+
170+
return resp
173171

174-
check_invalid({"X-Foo": "$u"})
172+
resp = check_invalid({"X-Foo": "$u"})
173+
assert 'detail' in resp and 'Unknown variable' in resp['detail']

0 commit comments

Comments
 (0)