Add integration test for failed regex predicate.

This commit is contained in:
jcamiel 2022-03-25 13:45:14 +01:00 committed by Fabrice Reix
parent 4f5cfc0f1f
commit f63c078ea8
5 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,8 @@
error: Assert Failure
--> tests_failed/query_match_none.hurl:4:0
|
4 | header "Location" matches /^foo$/
| actual: none
| expected: matches regex <^foo$>
|

View File

@ -0,0 +1 @@
4

View File

@ -0,0 +1,7 @@
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/query-match-none</span></span>
</span><span class="response"><span class="line"><span class="version">HTTP/*</span> <span class="number">*</span></span>
<span class="line section-header">[Asserts]</span>
<span class="line"><span class="query-type">header</span> <span class="string">"Location"</span> <span class="predicate-type">matches</span> <span class="regex">/^foo$/</span></span>
</span></span><span class="line"></span>
<span class="line"></span>
</code></pre>

View File

@ -0,0 +1,6 @@
GET http://localhost:8000/query-match-none
HTTP/* *
[Asserts]
header "Location" matches /^foo$/

View File

@ -0,0 +1,7 @@
from app import app
from flask import request
@app.route("/query-match-none")
def query_match_none():
return "Hello World!"