Normalize acronym case in errors.

This commit is contained in:
jcamiel 2022-08-08 18:33:49 +02:00
parent 2cbb73a9c1
commit 7f561566dc
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
60 changed files with 195 additions and 195 deletions

View File

@ -1,4 +1,4 @@
error: Http Connection
error: HTTP connection
--> ssl/error_self_signed_certificate.hurl:1:5
|
1 | GET https://localhost:8001/hello

View File

@ -1,4 +1,4 @@
error: Http Connection
error: HTTP connection
--> ssl/error_self_signed_certificate.hurl:1:5
|
1 | GET https://localhost:8001/hello

View File

@ -1,4 +1,4 @@
error: Http Connection
error: HTTP connection
--> ssl/error_self_signed_certificate.hurl:1:5
|
1 | GET https://localhost:8001/hello

View File

@ -2,6 +2,6 @@ error: Parsing section
--> tests_error_parser/duplicate_section.hurl:4:1
|
4 | [QueryStringParams]
| ^ The section is already defined
| ^ the section is already defined
|

View File

@ -1,4 +1,4 @@
error: Parsing Filename
error: Parsing filename
--> tests_error_parser/file.hurl:2:6
|
2 | file,

View File

@ -1,7 +1,7 @@
error: Parsing Method
error: Parsing method
--> tests_error_parser/invalid_character_at_end.hurl:3:1
|
3 | XXX
| ^ The HTTP method is not valid. Available HTTP Methods are GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE or PATCH
| ^ the HTTP method is not valid. Available HTTP Methods are GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE or PATCH
|

View File

@ -2,6 +2,6 @@ error: Parsing cookie attribute
--> tests_error_parser/invalid_cookiepath.hurl:4:17
|
4 | cookie "cookie1[X]" equals "1"
| ^ The cookie attribute is not valid
| ^ the cookie attribute is not valid
|

View File

@ -2,6 +2,6 @@ error: Parsing escape character
--> tests_error_parser/invalid_escape.hurl:4:25
|
4 | xpath "//item" equals "\d\d\d\d-\d\d-\d\d"
| ^ The escaping sequence is not valid
| ^ the escaping sequence is not valid
|

View File

@ -2,6 +2,6 @@ error: Parsing regex
--> tests_error_parser/invalid_regex.hurl:4:23
|
4 | jsonpath "$.data" == /aa{a}/
| ^ Invalid Regex expression: repetition quantifier expects a valid decimal
| ^ invalid Regex expression: repetition quantifier expects a valid decimal
|

View File

@ -1,7 +1,7 @@
error: Parsing url
error: Parsing URL
--> tests_error_parser/invalid_url.hurl:1:26
|
1 | GET http://localhost:8000> #
| ^ Illegal character <>>
| ^ illegal character <>>
|

View File

@ -1,7 +1,7 @@
error: Parsing json
error: Parsing JSON
--> tests_error_parser/json.hurl:2:10
|
2 | { "name":
| ^ json error
| ^ JSON error
|

View File

@ -1,7 +1,7 @@
error: Parsing json
error: Parsing JSON
--> tests_error_parser/json_unexpected_character.hurl:2:10
|
2 | { "name": x
| ^ json error
| ^ JSON error
|

View File

@ -1,6 +1,6 @@
error: Parsing json
error: Parsing JSON
--> tests_error_parser/json_unexpected_eof.hurl:2:10
|
2 | { "name":
| ^ json error
| ^ JSON error
|

View File

@ -1,7 +1,7 @@
error: Parsing Method
error: Parsing method
--> tests_error_parser/method.hurl:1:1
|
1 | GeT http://localhost:8000/hello
| ^ The HTTP method is not valid. Did you mean GET?
| ^ the HTTP method is not valid. Did you mean GET?
|

View File

@ -1,7 +1,7 @@
error: Parsing Status
error: Parsing status code
--> tests_error_parser/status.hurl:2:10
|
2 | HTTP/1.1 oa0
| ^ The http status is not valid
| ^ HTTP status code is not valid
|

View File

@ -1,7 +1,7 @@
error: Parsing Version
error: Parsing version
--> tests_error_parser/version.hurl:2:6
|
2 | HTTP/11 200
| ^ The http version must be 1.0, 1.1, 2 or *
| ^ HTTP version must be 1.0, 1.1, 2 or *
|

View File

@ -1,4 +1,4 @@
error: Assert Body Value
error: Assert body value
--> tests_failed/assert_base64.hurl:12:8
|
12 | base64,bGluZTEKbGluZTIKbGluZTMK;

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/assert_bytearray.hurl:4:0
|
4 | bytes equals hex,00;
@ -6,7 +6,7 @@ error: Assert Failure
| expected: byte array <00>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_bytearray.hurl:5:0
|
5 | sha256 equals hex,a8100ae6aa1940d0b663bb31cd466142ebbdbd5187131b92d93818987832eb88;

View File

@ -1,7 +1,7 @@
error: Decompression Error
error: Decompression error
--> tests_failed/assert_content_encoding.hurl:4:1
|
4 | ```Hello World!```
| ^ Compression unknown is not supported
| ^ compression unknown is not supported
|

View File

@ -1,7 +1,7 @@
error: Decompression Error
error: Decompression error
--> tests_failed/assert_decompress.hurl:3:1
|
3 | ```Hello World!```
| ^ Could not uncompress response with gzip
| ^ could not uncompress response with gzip
|

View File

@ -1,4 +1,4 @@
error: Assert Body Value
error: Assert body value
--> tests_failed/assert_file.hurl:8:1
|
8 | file,data.txt;

View File

@ -1,7 +1,7 @@
error: Header not Found
error: Header not found
--> tests_failed/assert_header_not_found.hurl:3:1
|
3 | Custom: ???
| ^^^^^^ This header has not been found in the response
| ^^^^^^ this header has not been found in the response
|

View File

@ -1,4 +1,4 @@
error: Assert Header Value
error: Assert header value
--> tests_failed/assert_header_value.hurl:3:15
|
3 | Content-Type: ???

View File

@ -1,4 +1,4 @@
error: Assert Http Version
error: Assert HTTP version
--> tests_failed/assert_http_version.hurl:2:6
|
2 | HTTP/2 200

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/assert_invalid_predicate_type.hurl:4:0
|
4 | header "content-type" equals 1

View File

@ -1,7 +1,7 @@
error: Invalid Decoding
error: Invalid decoding
--> tests_failed/assert_match_utf8.hurl:4:1
|
4 | body matches ".*"
| ^^^^ The body can not be decoded with charset 'utf-8'
| ^^^^ the body can not be decoded with charset 'utf-8'
|

View File

@ -21,7 +21,7 @@
},
{
"success": false,
"message": "Invalid Decoding\n --> tests_failed/assert_match_utf8.hurl:4:1\n |\n 4 | body matches \".*\"\n | ^^^^ The body can not be decoded with charset 'utf-8'\n |",
"message": "Invalid decoding\n --> tests_failed/assert_match_utf8.hurl:4:1\n |\n 4 | body matches \".*\"\n | ^^^^ the body can not be decoded with charset 'utf-8'\n |",
"line": 4
}
]

View File

@ -1,4 +1,4 @@
error: Assert Body Value
error: Assert body value
--> tests_failed/assert_newline.hurl:9:4
|
9 | ```<p>Hello</p>

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/assert_query_cookie.hurl:7:0
|
7 | cookie "cookie1[Secure]" equals false # This is not valid, Secure attribute exists or not but does have a value
@ -6,7 +6,7 @@ error: Assert Failure
| expected: bool <false>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_query_cookie.hurl:11:0
|
11 | cookie "cookie2[Secure]" equals true # This is not valid, Secure attribute exists or not but does have a value
@ -15,7 +15,7 @@ error: Assert Failure
| >>> types between actual and expected are not consistent
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_query_cookie.hurl:12:0
|
12 | cookie "cookie2[Secure]" not equals true # This is not valid, Secure attribute exists or not but does have a value

View File

@ -2,6 +2,6 @@ error: Invalid regex
--> tests_failed/assert_query_invalid_regex.hurl:4:7
|
4 | regex "[x" exists
| ^^^^ Regex expression is not valid
| ^^^^ regex expression is not valid
|

View File

@ -1,7 +1,7 @@
error: Invalid xpath expression
error: Invalid XPath expression
--> tests_failed/assert_query_invalid_xpath.hurl:4:7
|
4 | xpath "//" equals 1
| ^^^^ The xpath expression is not valid
| ^^^^ the XPath expression is not valid
|

View File

@ -1,4 +1,4 @@
error: Assert Status
error: Assert status code
--> tests_failed/assert_status.hurl:2:10
|
2 | HTTP/1.0 200

View File

@ -17,7 +17,7 @@
},
{
"success": false,
"message": "Assert Status\n --> tests_failed/assert_status.hurl:2:10\n |\n 2 | HTTP/1.0 200\n | ^^^ actual value is <404>\n |",
"message": "Assert status code\n --> tests_failed/assert_status.hurl:2:10\n |\n 2 | HTTP/1.0 200\n | ^^^ actual value is <404>\n |",
"line": 2
}
]

View File

@ -1,7 +1,7 @@
error: Undefined Variable
error: Undefined variable
--> tests_failed/assert_template_variable_not_found.hurl:4:33
|
4 | header "content-type" equals "{{content_type}}"
| ^^^^^^^^^^^^ You must set the variable content_type
| ^^^^^^^^^^^^ you must set the variable content_type
|

View File

@ -21,7 +21,7 @@
},
{
"success": false,
"message": "Undefined Variable\n --> tests_failed/assert_template_variable_not_found.hurl:4:33\n |\n 4 | header \"content-type\" equals \"{{content_type}}\"\n | ^^^^^^^^^^^^ You must set the variable content_type\n |",
"message": "Undefined variable\n --> tests_failed/assert_template_variable_not_found.hurl:4:33\n |\n 4 | header \"content-type\" equals \"{{content_type}}\"\n | ^^^^^^^^^^^^ you must set the variable content_type\n |",
"line": 4
}
]

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:4:0
|
4 | header "content-type" equals "XXX"
@ -6,7 +6,7 @@ error: Assert Failure
| expected: string <XXX>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:5:0
|
5 | header "content-type" notEquals "text/html; charset=utf-8"
@ -14,7 +14,7 @@ error: Assert Failure
| expected: string <text/html; charset=utf-8>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:6:0
|
6 | jsonpath "$.id" equals "000001"
@ -22,7 +22,7 @@ error: Assert Failure
| expected: string <000001>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:7:0
|
7 | jsonpath "$.values" includes 100
@ -30,7 +30,7 @@ error: Assert Failure
| expected: includes int <100>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:8:0
|
8 | jsonpath "$.values" not contains "Hello"
@ -39,7 +39,7 @@ error: Assert Failure
| >>> types between actual and expected are not consistent
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:9:0
|
9 | jsonpath "$.count" greaterThan 5
@ -47,7 +47,7 @@ error: Assert Failure
| expected: greater than int <5>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:10:0
|
10 | jsonpath "$.count" isFloat
@ -55,7 +55,7 @@ error: Assert Failure
| expected: float
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_value_error.hurl:11:0
|
11 | bytes contains hex,00;

View File

@ -21,42 +21,42 @@
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <XXX>\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:4:0\n |\n 4 | header \"content-type\" equals \"XXX\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <XXX>\n |",
"line": 4
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <text/html; charset=utf-8>\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:5:0\n |\n 5 | header \"content-type\" notEquals \"text/html; charset=utf-8\"\n | actual: string <text/html; charset=utf-8>\n | expected: string <text/html; charset=utf-8>\n |",
"line": 5
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:6:0\n |\n 6 | jsonpath \"$.id\" equals \"000001\"\n | actual: none\n | expected: string <000001>\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:6:0\n |\n 6 | jsonpath \"$.id\" equals \"000001\"\n | actual: none\n | expected: string <000001>\n |",
"line": 6
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:7:0\n |\n 7 | jsonpath \"$.values\" includes 100\n | actual: [int <1>, int <2>, int <3>]\n | expected: includes int <100>\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:7:0\n |\n 7 | jsonpath \"$.values\" includes 100\n | actual: [int <1>, int <2>, int <3>]\n | expected: includes int <100>\n |",
"line": 7
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:8:0\n |\n 8 | jsonpath \"$.values\" not contains \"Hello\"\n | actual: [int <1>, int <2>, int <3>]\n | expected: not contains string <Hello>\n | >>> types between actual and expected are not consistent\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:8:0\n |\n 8 | jsonpath \"$.values\" not contains \"Hello\"\n | actual: [int <1>, int <2>, int <3>]\n | expected: not contains string <Hello>\n | >>> types between actual and expected are not consistent\n |",
"line": 8
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:9:0\n |\n 9 | jsonpath \"$.count\" greaterThan 5\n | actual: int <2>\n | expected: greater than int <5>\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:9:0\n |\n 9 | jsonpath \"$.count\" greaterThan 5\n | actual: int <2>\n | expected: greater than int <5>\n |",
"line": 9
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:10:0\n |\n10 | jsonpath \"$.count\" isFloat\n | actual: int <2>\n | expected: float\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:10:0\n |\n10 | jsonpath \"$.count\" isFloat\n | actual: int <2>\n | expected: float\n |",
"line": 10
},
{
"success": false,
"message": "Assert Failure\n --> tests_failed/assert_value_error.hurl:11:0\n |\n11 | bytes contains hex,00;\n | actual: byte array <7b202276616c756573223a205b312c322c335d2c2022636f756e74223a20327d>\n | expected: contains byte array <00>\n |",
"message": "Assert failure\n --> tests_failed/assert_value_error.hurl:11:0\n |\n11 | bytes contains hex,00;\n | actual: byte array <7b202276616c756573223a205b312c322c335d2c2022636f756e74223a20327d>\n | expected: contains byte array <00>\n |",
"line": 11
}
]

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/assert_variable.hurl:8:0
|
8 | variable "toto" equals "tata"
@ -6,14 +6,14 @@ error: Assert Failure
| expected: string <tata>
|
error: Undefined Variable
error: Undefined variable
--> tests_failed/assert_variable.hurl:9:28
|
9 | variable "status" equals {{unknown}}
| ^^^^^^^ You must set the variable unknown
| ^^^^^^^ you must set the variable unknown
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_variable.hurl:10:0
|
10 | variable "status" equals {{type}}
@ -21,7 +21,7 @@ error: Assert Failure
| expected: string <text/html; charset=utf-8>
|
error: Assert Failure
error: Assert failure
--> tests_failed/assert_variable.hurl:11:0
|
11 | variable "status" equals {{length}}

View File

@ -1,4 +1,4 @@
error: Invalid Json
error: Invalid JSON
--> tests_failed/body_json.hurl:3:18
|
3 | "success": {{success}}

View File

@ -1,7 +1,7 @@
error: File ReadAccess
error: File read access
--> tests_failed/file_read_access.hurl:2:6
|
2 | file,does_not_exist;
| ^^^^^^^^^^^^^^ File does_not_exist can not be read
| ^^^^^^^^^^^^^^ file does_not_exist can not be read
|

View File

@ -2,26 +2,26 @@ error: Unauthorized file access
--> tests_failed/file_unauthorized.hurl:2:6
|
2 | file,/secret.txt;
| ^^^^^^^^^^^ Unauthorized access to file /secret.txt, check --file-root option
| ^^^^^^^^^^^ unauthorized access to file /secret.txt, check --file-root option
|
error: Unauthorized file access
--> tests_failed/file_unauthorized.hurl:7:6
|
7 | file,../secret.txt;
| ^^^^^^^^^^^^^ Unauthorized access to file ../secret.txt, check --file-root option
| ^^^^^^^^^^^^^ unauthorized access to file ../secret.txt, check --file-root option
|
error: Unauthorized file access
--> tests_failed/file_unauthorized.hurl:13:13
|
13 | file1: file,/secret.txt;
| ^^^^^^^^^^^ Unauthorized access to file /secret.txt, check --file-root option
| ^^^^^^^^^^^ unauthorized access to file /secret.txt, check --file-root option
|
error: Unauthorized file access
--> tests_failed/file_unauthorized.hurl:19:13
|
19 | file1: file,../secret.txt;
| ^^^^^^^^^^^^^ Unauthorized access to file ../secret.txt, check --file-root option
| ^^^^^^^^^^^^^ unauthorized access to file ../secret.txt, check --file-root option
|

View File

@ -1,4 +1,4 @@
error: Http Connection
error: HTTP connection
--> tests_failed/http_connection.hurl:1:5
|
1 | GET http://unknown

View File

@ -1,6 +1,6 @@
error: Invalid jsonpath
error: Invalid JSONPath
--> tests_failed/invalid_jsonpath.hurl:4:10
|
4 | jsonpath "" equals false
| ^^ the jsonpath expression '' is not valid
| ^^ the JSONPath expression '' is not valid
|

View File

@ -1,4 +1,4 @@
error: Http Connection
error: HTTP connection
--> tests_failed/invalid_url.hurl:1:5
|
1 | GET ???

View File

@ -2,6 +2,6 @@ error: Invalid XML
--> tests_failed/invalid_xml.hurl:4:1
|
4 | xpath "xx" equals 1
| ^^^^^^^^^^ The Http response is not a valid XML
| ^^^^^^^^^^ the HTTP response is not a valid XML
|

View File

@ -1,7 +1,7 @@
error: Http Connection
error: HTTP connection
--> tests_failed/max_redirect.hurl:1:5
|
1 | GET http://localhost:8000/redirect/7
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Too many redirect
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ too many redirect
|

View File

@ -1,7 +1,7 @@
error: File ReadAccess
error: File read access
--> tests_failed/multipart_form_data.hurl:4:15
|
4 | upload1: file,unknown;
| ^^^^^^^ File unknown can not be read
| ^^^^^^^ file unknown can not be read
|

View File

@ -1 +1 @@
error: Could not uncompress response with gzip
error: could not uncompress response with gzip

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:4:0
|
4 | jsonpath "$.status" equals "true"
@ -6,7 +6,7 @@ error: Assert Failure
| expected: string <true>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:6:0
|
6 | jsonpath "$.count" equals 0
@ -14,7 +14,7 @@ error: Assert Failure
| expected: int <0>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:7:0
|
7 | jsonpath "$.message" equals 0
@ -22,7 +22,7 @@ error: Assert Failure
| expected: int <0>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:8:0
|
8 | jsonpath "$.empty" equals 0
@ -30,7 +30,7 @@ error: Assert Failure
| expected: int <0>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:9:0
|
9 | jsonpath "$.number" equals 1.1
@ -38,7 +38,7 @@ error: Assert Failure
| expected: float <1.1>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:10:0
|
10 | jsonpath "$.message" startsWith "hi"
@ -46,7 +46,7 @@ error: Assert Failure
| expected: starts with string <hi>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:11:0
|
11 | jsonpath "$.message" endsWith "hi"
@ -54,7 +54,7 @@ error: Assert Failure
| expected: ends with string <hi>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:12:0
|
12 | jsonpath "$.message" contains "hi"
@ -62,7 +62,7 @@ error: Assert Failure
| expected: contains string <hi>
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:13:0
|
13 | jsonpath "$.message" matches "hi"
@ -74,10 +74,10 @@ error: Subquery error
--> tests_failed/predicate.hurl:14:22
|
14 | jsonpath "$.message" count == 1
| ^^^^^ Type <string> from query result and subquery do not match
| ^^^^^ type <string> from query result and subquery do not match
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:15:0
|
15 | jsonpath "$.toto" exists
@ -85,7 +85,7 @@ error: Assert Failure
| expected: something
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:16:0
|
16 | jsonpath "$.message" not exists
@ -93,7 +93,7 @@ error: Assert Failure
| expected: not something
|
error: Assert Failure
error: Assert failure
--> tests_failed/predicate.hurl:17:0
|
17 | jsonpath "$.list" count == 2

View File

@ -1,7 +1,7 @@
error: Header not Found
error: Header not found
--> tests_failed/query_header_not_found.hurl:3:1
|
3 | Custom: XXX
| ^^^^^^ This header has not been found in the response
| ^^^^^^ this header has not been found in the response
|

View File

@ -21,7 +21,7 @@
},
{
"success": false,
"message": "Header not Found\n --> tests_failed/query_header_not_found.hurl:3:1\n |\n 3 | Custom: XXX\n | ^^^^^^ This header has not been found in the response\n |",
"message": "Header not found\n --> tests_failed/query_header_not_found.hurl:3:1\n |\n 3 | Custom: XXX\n | ^^^^^^ this header has not been found in the response\n |",
"line": 3
}
]

View File

@ -1,7 +1,7 @@
error: Invalid Json
error: Invalid JSON
--> tests_failed/query_invalid_json.hurl:4:1
|
4 | jsonpath "$.errors" count == 2
| ^^^^^^^^^^^^^^^^^^^ The http response is not a valid json
| ^^^^^^^^^^^^^^^^^^^ the HTTP response is not a valid JSON
|

View File

@ -1,7 +1,7 @@
error: Invalid Decoding
error: Invalid decoding
--> tests_failed/query_invalid_utf8.hurl:4:1
|
4 | jsonpath "$.errors" count == 2
| ^^^^^^^^^^^^^^^^^^^ The body can not be decoded with charset 'utf-8'
| ^^^^^^^^^^^^^^^^^^^ the body can not be decoded with charset 'utf-8'
|

View File

@ -1,4 +1,4 @@
error: Assert Failure
error: Assert failure
--> tests_failed/query_match_none.hurl:4:0
|
4 | header "Location" matches /^foo$/

View File

@ -1,7 +1,7 @@
error: Undefined Variable
error: Undefined variable
--> tests_failed/template_variable_not_found.hurl:1:7
|
1 | GET {{url}}
| ^^^ You must set the variable url
| ^^^ you must set the variable url
|

View File

@ -1,4 +1,4 @@
error: Unrenderable Variable
error: Unrenderable variable
--> tests_failed/template_variable_not_renderable.hurl:8:11
|
8 | param1: {{list}}

View File

@ -157,7 +157,7 @@ HTTP/1.0 200
.unwrap();
assert_eq!(
std::str::from_utf8(&buffer).unwrap(),
r#"<?xml version="1.0" encoding="UTF-8"?><testcase id="test.hurl" time="0.230"><failure>Assert Status
r#"<?xml version="1.0" encoding="UTF-8"?><testcase id="test.hurl" time="0.230"><failure>Assert status code
--> test.hurl:2:10
|
2 | HTTP/1.0 200
@ -197,7 +197,7 @@ HTTP/1.0 200
.unwrap();
assert_eq!(
std::str::from_utf8(&buffer).unwrap(),
r#"<?xml version="1.0" encoding="UTF-8"?><testcase id="test.hurl" time="0.230"><error>Http Connection
r#"<?xml version="1.0" encoding="UTF-8"?><testcase id="test.hurl" time="0.230"><error>HTTP connection
--> test.hurl:1:5
|
1 | GET http://unknown

View File

@ -12,76 +12,76 @@ impl Error for runner::Error {
fn description(&self) -> String {
match &self.inner {
RunnerError::InvalidUrl(..) => "Invalid url".to_string(),
RunnerError::TemplateVariableNotDefined { .. } => "Undefined Variable".to_string(),
RunnerError::VariableNotDefined { .. } => "Undefined Variable".to_string(),
RunnerError::HttpConnection { .. } => "Http Connection".to_string(),
RunnerError::CouldNotResolveProxyName => "Http Connection".to_string(),
RunnerError::CouldNotResolveHost(_) => "Http Connection".to_string(),
RunnerError::FailToConnect => "Http Connection".to_string(),
RunnerError::Timeout => "Http Connection".to_string(),
RunnerError::TooManyRedirect => "Http Connection".to_string(),
RunnerError::CouldNotParseResponse => "Http Connection".to_string(),
RunnerError::SslCertificate { .. } => "SSL Certificate".to_string(),
RunnerError::PredicateValue { .. } => "Assert - Predicate Value Failed".to_string(),
RunnerError::InvalidUrl(..) => "Invalid URL".to_string(),
RunnerError::TemplateVariableNotDefined { .. } => "Undefined variable".to_string(),
RunnerError::VariableNotDefined { .. } => "Undefined variable".to_string(),
RunnerError::HttpConnection { .. } => "HTTP connection".to_string(),
RunnerError::CouldNotResolveProxyName => "HTTP connection".to_string(),
RunnerError::CouldNotResolveHost(_) => "HTTP connection".to_string(),
RunnerError::FailToConnect => "HTTP connection".to_string(),
RunnerError::Timeout => "HTTP connection".to_string(),
RunnerError::TooManyRedirect => "HTTP connection".to_string(),
RunnerError::CouldNotParseResponse => "HTTP connection".to_string(),
RunnerError::SslCertificate { .. } => "SSL certificate".to_string(),
RunnerError::PredicateValue { .. } => "Assert - predicate value failed".to_string(),
RunnerError::InvalidRegex {} => "Invalid regex".to_string(),
RunnerError::FileReadAccess { .. } => "File ReadAccess".to_string(),
RunnerError::FileReadAccess { .. } => "File read access".to_string(),
RunnerError::QueryInvalidXml { .. } => "Invalid XML".to_string(),
RunnerError::QueryInvalidXpathEval {} => "Invalid xpath expression".to_string(),
RunnerError::QueryHeaderNotFound {} => "Header not Found".to_string(),
RunnerError::QueryCookieNotFound {} => "Cookie not Found".to_string(),
RunnerError::AssertHeaderValueError { .. } => "Assert Header Value".to_string(),
RunnerError::AssertBodyValueError { .. } => "Assert Body Value".to_string(),
RunnerError::AssertVersion { .. } => "Assert Http Version".to_string(),
RunnerError::AssertStatus { .. } => "Assert Status".to_string(),
RunnerError::QueryInvalidJson { .. } => "Invalid Json".to_string(),
RunnerError::QueryInvalidJsonpathExpression { .. } => "Invalid jsonpath".to_string(),
RunnerError::PredicateType { .. } => "Assert - Inconsistent predicate type".to_string(),
RunnerError::QueryInvalidXpathEval {} => "Invalid XPath expression".to_string(),
RunnerError::QueryHeaderNotFound {} => "Header not found".to_string(),
RunnerError::QueryCookieNotFound {} => "Cookie not found".to_string(),
RunnerError::AssertHeaderValueError { .. } => "Assert header value".to_string(),
RunnerError::AssertBodyValueError { .. } => "Assert body value".to_string(),
RunnerError::AssertVersion { .. } => "Assert HTTP version".to_string(),
RunnerError::AssertStatus { .. } => "Assert status code".to_string(),
RunnerError::QueryInvalidJson { .. } => "Invalid JSON".to_string(),
RunnerError::QueryInvalidJsonpathExpression { .. } => "Invalid JSONPath".to_string(),
RunnerError::PredicateType { .. } => "Assert - inconsistent predicate type".to_string(),
RunnerError::SubqueryInvalidInput { .. } => "Subquery error".to_string(),
RunnerError::InvalidDecoding { .. } => "Invalid Decoding".to_string(),
RunnerError::InvalidCharset { .. } => "Invalid Charset".to_string(),
RunnerError::AssertFailure { .. } => "Assert Failure".to_string(),
RunnerError::UnrenderableVariable { .. } => "Unrenderable Variable".to_string(),
RunnerError::InvalidDecoding { .. } => "Invalid decoding".to_string(),
RunnerError::InvalidCharset { .. } => "Invalid charset".to_string(),
RunnerError::AssertFailure { .. } => "Assert failure".to_string(),
RunnerError::UnrenderableVariable { .. } => "Unrenderable variable".to_string(),
RunnerError::NoQueryResult { .. } => "No query result".to_string(),
RunnerError::UnsupportedContentEncoding(..) => "Decompression Error".to_string(),
RunnerError::CouldNotUncompressResponse(..) => "Decompression Error".to_string(),
RunnerError::InvalidJson { .. } => "Invalid Json".to_string(),
RunnerError::UnsupportedContentEncoding(..) => "Decompression error".to_string(),
RunnerError::CouldNotUncompressResponse(..) => "Decompression error".to_string(),
RunnerError::InvalidJson { .. } => "Invalid JSON".to_string(),
RunnerError::UnauthorizedFileAccess { .. } => "Unauthorized file access".to_string(),
}
}
fn fixme(&self) -> String {
match &self.inner {
RunnerError::InvalidUrl(url) => format!("Invalid url <{}>", url),
RunnerError::InvalidUrl(url) => format!("invalid URL <{}>", url),
RunnerError::TemplateVariableNotDefined { name } => {
format!("You must set the variable {}", name)
format!("you must set the variable {}", name)
}
RunnerError::HttpConnection { message, .. } => message.to_string(),
RunnerError::CouldNotResolveProxyName => "Could not resolve proxy name".to_string(),
RunnerError::CouldNotResolveHost(host) => format!("Could not resolve host <{}>", host),
RunnerError::FailToConnect => "Fail to connect".to_string(),
RunnerError::Timeout => "Timeout has been reached".to_string(),
RunnerError::TooManyRedirect => "Too many redirect".to_string(),
RunnerError::CouldNotParseResponse => "Could not parse response".to_string(),
RunnerError::CouldNotResolveProxyName => "could not resolve proxy name".to_string(),
RunnerError::CouldNotResolveHost(host) => format!("could not resolve host <{}>", host),
RunnerError::FailToConnect => "fail to connect".to_string(),
RunnerError::Timeout => "timeout has been reached".to_string(),
RunnerError::TooManyRedirect => "too many redirect".to_string(),
RunnerError::CouldNotParseResponse => "could not parse response".to_string(),
RunnerError::SslCertificate(description) => description.clone(),
RunnerError::AssertVersion { actual, .. } => format!("actual value is <{}>", actual),
RunnerError::AssertStatus { actual, .. } => format!("actual value is <{}>", actual),
RunnerError::PredicateValue(value) => {
format!("actual value is <{}>", value)
}
RunnerError::InvalidRegex {} => "Regex expression is not valid".to_string(),
RunnerError::FileReadAccess { value } => format!("File {} can not be read", value),
RunnerError::InvalidRegex {} => "regex expression is not valid".to_string(),
RunnerError::FileReadAccess { value } => format!("file {} can not be read", value),
RunnerError::QueryInvalidXml { .. } => {
"The Http response is not a valid XML".to_string()
"the HTTP response is not a valid XML".to_string()
}
RunnerError::QueryHeaderNotFound {} => {
"This header has not been found in the response".to_string()
"this header has not been found in the response".to_string()
}
RunnerError::QueryCookieNotFound {} => {
"This cookie has not been found in the response".to_string()
"this cookie has not been found in the response".to_string()
}
RunnerError::QueryInvalidXpathEval {} => {
"The xpath expression is not valid".to_string()
"the XPath expression is not valid".to_string()
}
RunnerError::AssertHeaderValueError { actual } => {
format!("actual value is <{}>", actual)
@ -90,22 +90,22 @@ impl Error for runner::Error {
format!("actual value is <{}>", actual)
}
RunnerError::QueryInvalidJson { .. } => {
"The http response is not a valid json".to_string()
"the HTTP response is not a valid JSON".to_string()
}
RunnerError::QueryInvalidJsonpathExpression { value } => {
format!("the jsonpath expression '{}' is not valid", value)
format!("the JSONPath expression '{}' is not valid", value)
}
RunnerError::PredicateType { .. } => {
"predicate type inconsistent with value return by query".to_string()
}
RunnerError::SubqueryInvalidInput(t) => {
format!("Type <{}> from query result and subquery do not match", t)
format!("type <{}> from query result and subquery do not match", t)
}
RunnerError::InvalidDecoding { charset } => {
format!("The body can not be decoded with charset '{}'", charset)
format!("the body can not be decoded with charset '{}'", charset)
}
RunnerError::InvalidCharset { charset } => {
format!("The charset '{}' is not valid", charset)
format!("the charset '{}' is not valid", charset)
}
RunnerError::AssertFailure {
actual,
@ -128,17 +128,17 @@ impl Error for runner::Error {
}
RunnerError::NoQueryResult { .. } => "The query didn't return any result".to_string(),
RunnerError::UnsupportedContentEncoding(algorithm) => {
format!("Compression {} is not supported", algorithm)
format!("compression {} is not supported", algorithm)
}
RunnerError::CouldNotUncompressResponse(algorithm) => {
format!("Could not uncompress response with {}", algorithm)
format!("could not uncompress response with {}", algorithm)
}
RunnerError::InvalidJson { value } => {
format!("actual value is <{}>", value)
}
RunnerError::UnauthorizedFileAccess { path } => {
format!(
"Unauthorized access to file {}, check --file-root option",
"unauthorized access to file {}, check --file-root option",
path.to_str().unwrap()
)
}

View File

@ -480,7 +480,7 @@ HTTP/1.0 200
};
assert_eq!(
error_string(filename, content, &error, false),
r#"Assert Status
r#"Assert status code
--> test.hurl:2:10
|
2 | HTTP/1.0 200
@ -504,11 +504,11 @@ xpath "strong(//head/title)" equals "Hello"
};
assert_eq!(
error_string(filename, content, &error, false),
r#"Invalid xpath expression
r#"Invalid XPath expression
--> test.hurl:4:7
|
4 | xpath "strong(//head/title)" equals "Hello"
| ^^^^^^^^^^^^^^^^^^^^^^ The xpath expression is not valid
| ^^^^^^^^^^^^^^^^^^^^^^ the XPath expression is not valid
|"#
)
}
@ -532,7 +532,7 @@ jsonpath "$.count" >= 5
};
assert_eq!(
error_string(filename, content, &error, false),
r#"Assert Failure
r#"Assert failure
--> test.hurl:4:0
|
4 | jsonpath "$.count" >= 5
@ -560,7 +560,7 @@ HTTP/1.0 200
};
assert_eq!(
error_string(filename, content, &error, false),
r#"Assert Body Value
r#"Assert body value
--> test.hurl:3:4
|
3 | ```<p>Hello</p>

View File

@ -36,18 +36,18 @@ impl Error for parser::Error {
fn description(&self) -> String {
match self.clone().inner {
ParseError::Method { .. } => "Parsing Method".to_string(),
ParseError::Version { .. } => "Parsing Version".to_string(),
ParseError::Status { .. } => "Parsing Status".to_string(),
ParseError::Filename { .. } => "Parsing Filename".to_string(),
ParseError::Method { .. } => "Parsing method".to_string(),
ParseError::Version { .. } => "Parsing version".to_string(),
ParseError::Status { .. } => "Parsing status code".to_string(),
ParseError::Filename { .. } => "Parsing filename".to_string(),
ParseError::Expecting { .. } => "Parsing literal".to_string(),
ParseError::Space { .. } => "Parsing space".to_string(),
ParseError::RequestSectionName { .. } => "Parsing request section name".to_string(),
ParseError::ResponseSectionName { .. } => "Parsing response section name".to_string(),
ParseError::JsonpathExpr { .. } => "Parsing jsonpath expression".to_string(),
ParseError::XPathExpr { .. } => "Parsing xpath expression".to_string(),
ParseError::JsonpathExpr { .. } => "Parsing JSONPath expression".to_string(),
ParseError::XPathExpr { .. } => "Parsing XPath expression".to_string(),
ParseError::TemplateVariable { .. } => "Parsing template variable".to_string(),
ParseError::Json { .. } => "Parsing json".to_string(),
ParseError::Json { .. } => "Parsing JSON".to_string(),
ParseError::Predicate { .. } => "Parsing predicate".to_string(),
ParseError::PredicateValue { .. } => "Parsing predicate value".to_string(),
ParseError::RegexExpr { .. } => "Parsing regex".to_string(),
@ -57,7 +57,7 @@ impl Error for parser::Error {
ParseError::EscapeChar { .. } => "Parsing escape character".to_string(),
ParseError::InvalidCookieAttribute { .. } => "Parsing cookie attribute".to_string(),
ParseError::OddNumberOfHexDigits { .. } => "Parsing hex bytearray".to_string(),
ParseError::UrlIllegalCharacter(_) => "Parsing url".to_string(),
ParseError::UrlIllegalCharacter(_) => "Parsing URL".to_string(),
_ => format!("{:?}", self),
}
}
@ -65,13 +65,13 @@ impl Error for parser::Error {
fn fixme(&self) -> String {
match self.inner.clone() {
ParseError::Method { name }
=> format!("The HTTP method is not valid. {}", did_you_mean(
=> format!("the HTTP method is not valid. {}", did_you_mean(
&["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"],
name.as_str(),
"Available HTTP Methods are GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE or PATCH",
)),
ParseError::Version { .. } => "The http version must be 1.0, 1.1, 2 or *".to_string(),
ParseError::Status { .. } => "The http status is not valid".to_string(),
ParseError::Version { .. } => "HTTP version must be 1.0, 1.1, 2 or *".to_string(),
ParseError::Status { .. } => "HTTP status code is not valid".to_string(),
ParseError::Filename { .. } => "expecting a filename".to_string(),
ParseError::Expecting { value } => format!("expecting '{}'", value),
ParseError::Space { .. } => "expecting a space".to_string(),
@ -87,28 +87,28 @@ impl Error for parser::Error {
name.as_str(),
"Valid values are Captures or Asserts",
)),
ParseError::JsonpathExpr { .. } => "expecting a jsonpath expression".to_string(),
ParseError::XPathExpr { .. } => "expecting a xpath expression".to_string(),
ParseError::JsonpathExpr { .. } => "expecting a JSONPath expression".to_string(),
ParseError::XPathExpr { .. } => "expecting a XPath expression".to_string(),
ParseError::TemplateVariable { .. } => "expecting a variable".to_string(),
ParseError::Json { .. } => "json error".to_string(),
ParseError::Json { .. } => "JSON error".to_string(),
ParseError::Predicate { .. } => "expecting a predicate".to_string(),
ParseError::PredicateValue { .. } => "invalid predicate value".to_string(),
ParseError::RegexExpr { message } => format!("Invalid Regex expression: {}", message),
ParseError::DuplicateSection { .. } => "The section is already defined".to_string(),
ParseError::RegexExpr { message } => format!("invalid Regex expression: {}", message),
ParseError::DuplicateSection { .. } => "the section is already defined".to_string(),
ParseError::RequestSection { .. } => {
"This is not a valid section for a request".to_string()
"this is not a valid section for a request".to_string()
}
ParseError::ResponseSection { .. } => {
"This is not a valid section for a response".to_string()
"this is not a valid section for a response".to_string()
}
ParseError::EscapeChar { .. } => "The escaping sequence is not valid".to_string(),
ParseError::EscapeChar { .. } => "the escaping sequence is not valid".to_string(),
ParseError::InvalidCookieAttribute { .. } => {
"The cookie attribute is not valid".to_string()
"the cookie attribute is not valid".to_string()
}
ParseError::OddNumberOfHexDigits { .. } => {
"Expecting an even number of hex digits".to_string()
"expecting an even number of hex digits".to_string()
}
ParseError::UrlIllegalCharacter(c) => format!("Illegal character <{}>", c),
ParseError::UrlIllegalCharacter(c) => format!("illegal character <{}>", c),
_ => format!("{:?}", self),
}
}