mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 20:12:09 +03:00
Add integration tests for --error-format long.
This commit is contained in:
parent
e476038440
commit
ff9b62faa1
33
integration/tests_failed/error_format_long.err.pattern
Normal file
33
integration/tests_failed/error_format_long.err.pattern
Normal file
@ -0,0 +1,33 @@
|
||||
HTTP/1.1 200
|
||||
Server: Werkzeug/~~~ Python/~~
|
||||
Date: ~~~
|
||||
Content-Type: text/html; charset=utf-8
|
||||
Content-Length: 45
|
||||
Server: Flask Server
|
||||
Connection: close
|
||||
|
||||
<html><head><title>Test</title></head></html>
|
||||
|
||||
error: Assert header value
|
||||
--> tests_failed/error_format_long.hurl:3:15
|
||||
|
|
||||
3 | Content-Type: text/html
|
||||
| ^^^^^^^^^ actual value is <text/html; charset=utf-8>
|
||||
|
|
||||
|
||||
error: Assert failure
|
||||
--> tests_failed/error_format_long.hurl:5:0
|
||||
|
|
||||
5 | xpath "string(//head/title)" equals "Welcome!"
|
||||
| actual: string <Test>
|
||||
| expected: string <Welcome!>
|
||||
|
|
||||
|
||||
error: Assert failure
|
||||
--> tests_failed/error_format_long.hurl:7:0
|
||||
|
|
||||
7 | xpath "//title" count == 2
|
||||
| actual: int <1>
|
||||
| expected: int <2>
|
||||
|
|
||||
|
1
integration/tests_failed/error_format_long.exit
Normal file
1
integration/tests_failed/error_format_long.exit
Normal file
@ -0,0 +1 @@
|
||||
4
|
8
integration/tests_failed/error_format_long.html
Normal file
8
integration/tests_failed/error_format_long.html
Normal file
@ -0,0 +1,8 @@
|
||||
<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/error-assert-xpath</span></span>
|
||||
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span>
|
||||
<span class="line"><span class="string">Content-Type</span>: <span class="string">text/html</span></span>
|
||||
<span class="line"><span class="section-header">[Asserts]</span></span>
|
||||
<span class="line"><span class="query-type">xpath</span> <span class="string">"string(//head/title)"</span> <span class="predicate-type">equals</span> <span class="string">"Welcome!"</span></span>
|
||||
<span class="line"><span class="query-type">xpath</span> <span class="string">"//foo"</span> <span class="predicate-type">isEmpty</span></span>
|
||||
<span class="line"><span class="query-type">xpath</span> <span class="string">"//title"</span> <span class="filter-type">count</span> <span class="predicate-type">==</span> <span class="number">2</span></span>
|
||||
</span></span></code></pre>
|
7
integration/tests_failed/error_format_long.hurl
Normal file
7
integration/tests_failed/error_format_long.hurl
Normal file
@ -0,0 +1,7 @@
|
||||
GET http://localhost:8000/error-assert-xpath
|
||||
HTTP 200
|
||||
Content-Type: text/html
|
||||
[Asserts]
|
||||
xpath "string(//head/title)" equals "Welcome!"
|
||||
xpath "//foo" isEmpty
|
||||
xpath "//title" count == 2
|
1
integration/tests_failed/error_format_long.json
Normal file
1
integration/tests_failed/error_format_long.json
Normal file
@ -0,0 +1 @@
|
||||
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/error-assert-xpath"},"response":{"status":200,"headers":[{"name":"Content-Type","value":"text/html"}],"asserts":[{"query":{"type":"xpath","expr":"string(//head/title)"},"predicate":{"type":"equal","value":"Welcome!"}},{"query":{"type":"xpath","expr":"//foo"},"predicate":{"type":"isEmpty"}},{"query":{"type":"xpath","expr":"//title"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":2}}]}}]}
|
3
integration/tests_failed/error_format_long.ps1
Executable file
3
integration/tests_failed/error_format_long.ps1
Executable file
@ -0,0 +1,3 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
hurl --error-format long tests_failed/error_format_long.hurl
|
3
integration/tests_failed/error_format_long.sh
Executable file
3
integration/tests_failed/error_format_long.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
hurl --error-format long tests_failed/error_format_long.hurl
|
@ -117,8 +117,8 @@
|
||||
< Connection: close
|
||||
<
|
||||
*
|
||||
*
|
||||
* Retry max count reached, no more retry
|
||||
*
|
||||
error: Assert status code
|
||||
--> tests_failed/option_retry.hurl:6:6
|
||||
|
|
||||
|
@ -207,8 +207,8 @@
|
||||
< Connection: close
|
||||
<
|
||||
*
|
||||
*
|
||||
* Retry max count reached, no more retry
|
||||
*
|
||||
error: Assert status code
|
||||
--> tests_failed/retry.hurl:2:6
|
||||
|
|
||||
|
Loading…
Reference in New Issue
Block a user