diff --git a/bin/test/test_integ.sh b/bin/test/test_integ.sh index 6b44dd84b..52f59d000 100755 --- a/bin/test/test_integ.sh +++ b/bin/test/test_integ.sh @@ -12,6 +12,7 @@ hurlfmt --version # integration tests cd integration +./hurlfmt_check.sh tests_ok/*.hurl ./integration.py ./test_curl_commands.sh ./test_html_output.py tests_ok/*.html tests_failed/*.html diff --git a/integration/hurlfmt_check.sh b/integration/hurlfmt_check.sh new file mode 100755 index 000000000..091d2552e --- /dev/null +++ b/integration/hurlfmt_check.sh @@ -0,0 +1,12 @@ +#!/bin/bash +#!/bin/bash +set -Eeuo pipefail +for hurl_file in "$@"; do + echo "hurlfmt $hurl_file" + output_file=/tmp/$(basename "$hurl_file") + hurlfmt "$hurl_file" >"$output_file" + if ! diff "$hurl_file" "$output_file"; then + exit 1 + fi +done + diff --git a/integration/integration.py b/integration/integration.py index 216e488ae..3413ff33b 100755 --- a/integration/integration.py +++ b/integration/integration.py @@ -28,6 +28,7 @@ def main(): extension = "ps1" if platform.system() == "Windows" else "sh" script_files = ( get_files("tests_ok/*." + extension) + + get_files("tests_ok_not_linted/*." + extension) + get_files("tests_failed/*." + extension) + get_files("tests_error_parser/*." + extension) + get_files("ssl/*." + extension) diff --git a/integration/tests_ok/assert_json.html b/integration/tests_ok/assert_json.html index 6e4582de5..24acb8d01 100644 --- a/integration/tests_ok/assert_json.html +++ b/integration/tests_ok/assert_json.html @@ -15,14 +15,12 @@ jsonpath "$.count" == 5 jsonpath "$.count" == 5.0 jsonpath "$.count" == {{five}} -jsonpath "$.count" equals 5 jsonpath "$.count" != 4 jsonpath "$.count" != {{four}} -jsonpath "$.count" not equals 4 +jsonpath "$.count" not == 4 jsonpath "$.count" > 1 jsonpath "$.count" > {{one}} jsonpath "$.count" > 1.0 -jsonpath "$.count" greaterThan 1.0 jsonpath "$.success" == false jsonpath "$.success" != null jsonpath "$.success" exists @@ -47,8 +45,6 @@ jsonpath "$.duration" <= 2.0 jsonpath "$.duration" < 2 jsonpath "$.duration" < {{two}} -jsonpath "$.duration" lessThanOrEquals 2.0 -jsonpath "$.duration" lessThan 2 jsonpath "$.duration" isFloat jsonpath "$.duration" not isInteger jsonpath "$.nullable" == null @@ -99,5 +95,5 @@ GET http://localhost:8000/assert-json/filter HTTP 200 [Asserts] -jsonpath "$.fruit[?(@.price.US==200)].name" nth 0 equals "grape" +jsonpath "$.fruit[?(@.price.US==200)].name" nth 0 == "grape" diff --git a/integration/tests_ok/assert_json.hurl b/integration/tests_ok/assert_json.hurl index ec5e1d63b..4bd31163d 100644 --- a/integration/tests_ok/assert_json.hurl +++ b/integration/tests_ok/assert_json.hurl @@ -15,14 +15,12 @@ count: jsonpath "$.count" jsonpath "$.count" == 5 jsonpath "$.count" == 5.0 jsonpath "$.count" == {{five}} -jsonpath "$.count" equals 5 jsonpath "$.count" != 4 jsonpath "$.count" != {{four}} -jsonpath "$.count" not equals 4 +jsonpath "$.count" not == 4 jsonpath "$.count" > 1 jsonpath "$.count" > {{one}} jsonpath "$.count" > 1.0 -jsonpath "$.count" greaterThan 1.0 jsonpath "$.success" == false jsonpath "$.success" != null jsonpath "$.success" exists @@ -47,8 +45,6 @@ jsonpath "$.duration" == 1.5 jsonpath "$.duration" <= 2.0 jsonpath "$.duration" < 2 jsonpath "$.duration" < {{two}} -jsonpath "$.duration" lessThanOrEquals 2.0 -jsonpath "$.duration" lessThan 2 jsonpath "$.duration" isFloat jsonpath "$.duration" not isInteger jsonpath "$.nullable" == null @@ -99,4 +95,4 @@ jsonpath "$[?(@.id == 1)].name" nth 0 == "Bob" GET http://localhost:8000/assert-json/filter HTTP 200 [Asserts] -jsonpath "$.fruit[?(@.price.US==200)].name" nth 0 equals "grape" +jsonpath "$.fruit[?(@.price.US==200)].name" nth 0 == "grape" diff --git a/integration/tests_ok/assert_json.json b/integration/tests_ok/assert_json.json index 7176dcec7..c5e6bd3d5 100644 --- a/integration/tests_ok/assert_json.json +++ b/integration/tests_ok/assert_json.json @@ -1 +1 @@ -{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-json"},"response":{"status":200,"captures":[{"name":"count","query":{"type":"jsonpath","expr":"$.count"}}],"asserts":[{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":5}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":5.0}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":"five"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":5}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"not-equal","value":4}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"not-equal","value":"four"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"not":true,"type":"equal","value":4}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":1}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":"one"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":1.0}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":1.0}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"equal","value":false}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"not-equal","value":null}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"isBoolean"}},{"query":{"type":"jsonpath","expr":"$.errors"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":2}},{"query":{"type":"jsonpath","expr":"$.errors"},"predicate":{"type":"isCollection"}},{"query":{"type":"jsonpath","expr":"$.failures"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":1}},{"query":{"type":"jsonpath","expr":"$.failures"},"predicate":{"type":"isCollection"}},{"query":{"type":"jsonpath","expr":"$.warnings"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.warnings"},"predicate":{"type":"isEmpty"}},{"query":{"type":"jsonpath","expr":"$.toto"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.failures"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.warnings"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.errors[0]"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.errors[0]"},"predicate":{"type":"isCollection"}},{"query":{"type":"jsonpath","expr":"$.errors[0].id"},"predicate":{"type":"equal","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.errors[0]['id']"},"predicate":{"type":"equal","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.errors[*].id"},"predicate":{"type":"include","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.errors[?(@.id=='error1')].id"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.failures[*].id"},"predicate":{"type":"include","value":"failure1"}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"equal","value":1.5}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less-or-equal","value":2.0}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less","value":2}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less","value":"two"}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less-or-equal","value":2.0}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less","value":2}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"isFloat"}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"not":true,"type":"isInteger"}},{"query":{"type":"jsonpath","expr":"$.nullable"},"predicate":{"type":"equal","value":null}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"equal","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"greater","value":"te"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"less","value":"testabc"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"less-or-equal","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"greater","value":"{{foo}}"}},{"query":{"type":"jsonpath","expr":"$.profile-id"},"predicate":{"type":"equal","value":"123abc"}},{"query":{"type":"jsonpath","expr":"$['profile-id']"},"predicate":{"type":"equal","value":"123abc"}}],"body":{"type":"json","value":{"count":5,"success":false,"errors":[{"id":"error1"},{"id":"error2"}],"failures":[{"id":"failure1"}],"warnings":[],"duration":1.5,"tags":["test"],"nullable":null,"profile-id":"123abc"}}}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json/index"},"response":{"status":200,"captures":[{"name":"index","query":{"type":"body"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json"},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors[{{index}}].id"},"predicate":{"type":"equal","value":"error2"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"type":"include","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"not":true,"type":"include","value":"prod"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"not":true,"type":"include","value":null}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json/list"},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":2}},{"query":{"type":"jsonpath","expr":"$.[0].name"},"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$[0].name"},"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$.[?(@.id == 1)].name"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$[?(@.id == 1)].name"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"Bob"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json/filter"},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.fruit[?(@.price.US==200)].name"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"grape"}}]}}]} +{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/assert-json"},"response":{"status":200,"captures":[{"name":"count","query":{"type":"jsonpath","expr":"$.count"}}],"asserts":[{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":5}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":5.0}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"equal","value":"five"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"not-equal","value":4}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"not-equal","value":"four"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"not":true,"type":"equal","value":4}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":1}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":"one"}},{"query":{"type":"jsonpath","expr":"$.count"},"predicate":{"type":"greater","value":1.0}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"equal","value":false}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"not-equal","value":null}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.success"},"predicate":{"type":"isBoolean"}},{"query":{"type":"jsonpath","expr":"$.errors"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":2}},{"query":{"type":"jsonpath","expr":"$.errors"},"predicate":{"type":"isCollection"}},{"query":{"type":"jsonpath","expr":"$.failures"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":1}},{"query":{"type":"jsonpath","expr":"$.failures"},"predicate":{"type":"isCollection"}},{"query":{"type":"jsonpath","expr":"$.warnings"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":0}},{"query":{"type":"jsonpath","expr":"$.warnings"},"predicate":{"type":"isEmpty"}},{"query":{"type":"jsonpath","expr":"$.toto"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.failures"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.warnings"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.errors[0]"},"predicate":{"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.errors[0]"},"predicate":{"type":"isCollection"}},{"query":{"type":"jsonpath","expr":"$.errors[0].id"},"predicate":{"type":"equal","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.errors[0]['id']"},"predicate":{"type":"equal","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.errors[*].id"},"predicate":{"type":"include","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.errors[?(@.id=='error1')].id"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"error1"}},{"query":{"type":"jsonpath","expr":"$.failures[*].id"},"predicate":{"type":"include","value":"failure1"}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"equal","value":1.5}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less-or-equal","value":2.0}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less","value":2}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"less","value":"two"}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"type":"isFloat"}},{"query":{"type":"jsonpath","expr":"$.duration"},"predicate":{"not":true,"type":"isInteger"}},{"query":{"type":"jsonpath","expr":"$.nullable"},"predicate":{"type":"equal","value":null}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"equal","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"greater","value":"te"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"less","value":"testabc"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"less-or-equal","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags[0]"},"predicate":{"type":"greater","value":"{{foo}}"}},{"query":{"type":"jsonpath","expr":"$.profile-id"},"predicate":{"type":"equal","value":"123abc"}},{"query":{"type":"jsonpath","expr":"$['profile-id']"},"predicate":{"type":"equal","value":"123abc"}}],"body":{"type":"json","value":{"count":5,"success":false,"errors":[{"id":"error1"},{"id":"error2"}],"failures":[{"id":"failure1"}],"warnings":[],"duration":1.5,"tags":["test"],"nullable":null,"profile-id":"123abc"}}}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json/index"},"response":{"status":200,"captures":[{"name":"index","query":{"type":"body"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json"},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.errors[{{index}}].id"},"predicate":{"type":"equal","value":"error2"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"type":"include","value":"test"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"not":true,"type":"include","value":"prod"}},{"query":{"type":"jsonpath","expr":"$.tags"},"predicate":{"not":true,"type":"include","value":null}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json/list"},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":2}},{"query":{"type":"jsonpath","expr":"$.[0].name"},"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$[0].name"},"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$.[?(@.id == 1)].name"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"Bob"}},{"query":{"type":"jsonpath","expr":"$[?(@.id == 1)].name"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"Bob"}}]}},{"request":{"method":"GET","url":"http://localhost:8000/assert-json/filter"},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.fruit[?(@.price.US==200)].name"},"filters":[{"type":"nth","n":0}],"predicate":{"type":"equal","value":"grape"}}]}}]} diff --git a/integration/tests_ok/assert_xpath.html b/integration/tests_ok/assert_xpath.html index 578288c2f..b66f0f23c 100644 --- a/integration/tests_ok/assert_xpath.html +++ b/integration/tests_ok/assert_xpath.html @@ -32,7 +32,7 @@ HTTP 200 [Asserts] xpath "//_:svg/_:g/_:circle" count == 3 -xpath "//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']" count == 3 +xpath "//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']" count == 3 xpath "//*[name()='svg']/*[name()='g']/*[name()='circle']" count == 3 diff --git a/integration/tests_ok/assert_xpath.hurl b/integration/tests_ok/assert_xpath.hurl index 9006e776a..6fa7b0fde 100644 --- a/integration/tests_ok/assert_xpath.hurl +++ b/integration/tests_ok/assert_xpath.hurl @@ -32,7 +32,7 @@ GET http://localhost:8000/assert-xpath-svg HTTP 200 [Asserts] xpath "//_:svg/_:g/_:circle" count == 3 -xpath "//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']" count == 3 +xpath "//*[local-name()='svg']/*[local-name()='g']/*[local-name()='circle']" count == 3 xpath "//*[name()='svg']/*[name()='g']/*[name()='circle']" count == 3 diff --git a/integration/tests_ok/bom.sh b/integration/tests_ok/bom.sh deleted file mode 100755 index 11f5a8bac..000000000 --- a/integration/tests_ok/bom.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -set -Eeuo pipefail -hurl tests_ok/bom.hurl --verbose diff --git a/integration/tests_ok/captures.html b/integration/tests_ok/captures.html index a654bc733..a67d4f7e3 100644 --- a/integration/tests_ok/captures.html +++ b/integration/tests_ok/captures.html @@ -27,14 +27,14 @@ HTTP 200 [Captures] -an_object: jsonpath "$['an_object']" -a_list: jsonpath "$['a_list']" -a_null: jsonpath "$['a_null']" +an_object: jsonpath "$['an_object']" +a_list: jsonpath "$['a_list']" +a_null: jsonpath "$['a_null']" an_integer: jsonpath "$['an_integer']" -a_float: jsonpath "$['a_float']" -a_bool: jsonpath "$['a_bool']" -a_string: jsonpath "$['a_string']" -all: jsonpath "$" +a_float: jsonpath "$['a_float']" +a_bool: jsonpath "$['a_bool']" +a_string: jsonpath "$['a_string']" +all: jsonpath "$" [Asserts] variable "a_null" exists variable "undefined" not exists diff --git a/integration/tests_ok/captures.hurl b/integration/tests_ok/captures.hurl index ebc613bed..1506303b3 100644 --- a/integration/tests_ok/captures.hurl +++ b/integration/tests_ok/captures.hurl @@ -27,14 +27,14 @@ GET http://localhost:8000/captures-json HTTP 200 [Captures] -an_object: jsonpath "$['an_object']" -a_list: jsonpath "$['a_list']" -a_null: jsonpath "$['a_null']" +an_object: jsonpath "$['an_object']" +a_list: jsonpath "$['a_list']" +a_null: jsonpath "$['a_null']" an_integer: jsonpath "$['an_integer']" -a_float: jsonpath "$['a_float']" -a_bool: jsonpath "$['a_bool']" -a_string: jsonpath "$['a_string']" -all: jsonpath "$" +a_float: jsonpath "$['a_float']" +a_bool: jsonpath "$['a_bool']" +a_string: jsonpath "$['a_string']" +all: jsonpath "$" [Asserts] variable "a_null" exists variable "undefined" not exists diff --git a/integration/tests_ok/cookie_jar.html b/integration/tests_ok/cookie_jar.html index fb3711ca5..df1ce4b44 100644 --- a/integration/tests_ok/cookie_jar.html +++ b/integration/tests_ok/cookie_jar.html @@ -10,7 +10,7 @@ Set-Cookie: SSID=Ap4PGTEq; Domain=localhost; Expires=Thu, 13 Jan 2078 22:23:01 GMT; HttpOnly; Path=/ [Asserts] header "Set-Cookie" count == 3 -cookie "LSID" equals "DQAAAKEaem_vYg" +cookie "LSID" == "DQAAAKEaem_vYg" cookie "LSID[Value]" == "DQAAAKEaem_vYg" cookie "LSID[Expires]" exists cookie "LSID[Expires]" format "%a, %d %b %Y %H:%M:%S" == "Thu, 13 Jan 2078 22:23:01" diff --git a/integration/tests_ok/cookie_jar.hurl b/integration/tests_ok/cookie_jar.hurl index 3d9333c68..1a8340470 100644 --- a/integration/tests_ok/cookie_jar.hurl +++ b/integration/tests_ok/cookie_jar.hurl @@ -10,7 +10,7 @@ Set-Cookie: HSID=AYQEVnDKrdst; Domain=localhost; Expires=Thu, 13 Jan 2078 22:23: Set-Cookie: SSID=Ap4PGTEq; Domain=localhost; Expires=Thu, 13 Jan 2078 22:23:01 GMT; HttpOnly; Path=/ [Asserts] header "Set-Cookie" count == 3 -cookie "LSID" equals "DQAAAKEaem_vYg" +cookie "LSID" == "DQAAAKEaem_vYg" cookie "LSID[Value]" == "DQAAAKEaem_vYg" cookie "LSID[Expires]" exists cookie "LSID[Expires]" format "%a, %d %b %Y %H:%M:%S" == "Thu, 13 Jan 2078 22:23:01" diff --git a/integration/tests_ok/cookies.html b/integration/tests_ok/cookies.html index 4f42ee2c3..e27a8dd8a 100644 --- a/integration/tests_ok/cookies.html +++ b/integration/tests_ok/cookies.html @@ -51,7 +51,7 @@ Set-Cookie: SSID=Ap4PGTEq; Domain=localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/ [Asserts] header "Set-Cookie" count == 3 -cookie "LSID" equals "DQAAAKEaem_vYg" +cookie "LSID" == "DQAAAKEaem_vYg" cookie "LSID[Value]" == "DQAAAKEaem_vYg" cookie "LSID[Expires]" exists cookie "LSID[Expires]" format "%a, %d %b %Y %H:%M:%S" == "Wed, 13 Jan 2021 22:23:01" diff --git a/integration/tests_ok/cookies.hurl b/integration/tests_ok/cookies.hurl index 0caab027e..719d69fcb 100644 --- a/integration/tests_ok/cookies.hurl +++ b/integration/tests_ok/cookies.hurl @@ -51,7 +51,7 @@ Set-Cookie: HSID=AYQEVnDKrdst; Domain=localhost; Expires=Wed, 13 Jan 2021 22:23: Set-Cookie: SSID=Ap4PGTEq; Domain=localhost; Expires=Wed, 13 Jan 2021 22:23:01 GMT; Secure; HttpOnly; Path=/ [Asserts] header "Set-Cookie" count == 3 -cookie "LSID" equals "DQAAAKEaem_vYg" +cookie "LSID" == "DQAAAKEaem_vYg" cookie "LSID[Value]" == "DQAAAKEaem_vYg" cookie "LSID[Expires]" exists cookie "LSID[Expires]" format "%a, %d %b %Y %H:%M:%S" == "Wed, 13 Jan 2021 22:23:01" diff --git a/integration/tests_ok/post_base64.html b/integration/tests_ok/post_base64.html index 0901eea51..103eeb4d7 100644 --- a/integration/tests_ok/post_base64.html +++ b/integration/tests_ok/post_base64.html @@ -1,5 +1,5 @@
POST http://localhost:8000/post-base64
-base64, SGVsbG8gV29ybGQh;  # Hello World!
+base64,SGVsbG8gV29ybGQh;  # Hello World!
 
 HTTP 200
 
diff --git a/integration/tests_ok/post_base64.hurl b/integration/tests_ok/post_base64.hurl
index 9c94f1aa5..27a67ba80 100644
--- a/integration/tests_ok/post_base64.hurl
+++ b/integration/tests_ok/post_base64.hurl
@@ -1,5 +1,5 @@
 POST http://localhost:8000/post-base64
-base64, SGVsbG8gV29ybGQh;  # Hello World!
+base64,SGVsbG8gV29ybGQh;  # Hello World!
 
 HTTP 200
 
diff --git a/integration/tests_ok/post_bytes.html b/integration/tests_ok/post_bytes.html
index 997b6c831..cbb9de1e1 100644
--- a/integration/tests_ok/post_bytes.html
+++ b/integration/tests_ok/post_bytes.html
@@ -1,6 +1,6 @@
 
POST http://localhost:8000/post-bytes
 Content-Type: application/octet-stream
-base64, AQID;  # echo -e -n '\x01\x02\x03' | base64
+base64,AQID;  # echo -e -n '\x01\x02\x03' | base64
 
 HTTP 200
 
diff --git a/integration/tests_ok/post_bytes.hurl b/integration/tests_ok/post_bytes.hurl index ac4aaa5ea..79501f0bb 100644 --- a/integration/tests_ok/post_bytes.hurl +++ b/integration/tests_ok/post_bytes.hurl @@ -1,5 +1,5 @@ POST http://localhost:8000/post-bytes Content-Type: application/octet-stream -base64, AQID; # echo -e -n '\x01\x02\x03' | base64 +base64,AQID; # echo -e -n '\x01\x02\x03' | base64 HTTP 200 diff --git a/integration/tests_ok/querystring_params.html b/integration/tests_ok/querystring_params.html index 30aeed2e9..c799e80ba 100644 --- a/integration/tests_ok/querystring_params.html +++ b/integration/tests_ok/querystring_params.html @@ -19,13 +19,13 @@ param2: param3: a=b param4: 1,2,3 -$top:5 +$top: 5 HTTP 200 # encoding slash GET http://localhost:8000/querystring-params-encoded?value1=/&value2=%2F [QueryStringParams] -value3:/ +value3: / HTTP 200
diff --git a/integration/tests_ok/querystring_params.hurl b/integration/tests_ok/querystring_params.hurl index 18b467b8e..06c870e7a 100644 --- a/integration/tests_ok/querystring_params.hurl +++ b/integration/tests_ok/querystring_params.hurl @@ -19,12 +19,12 @@ GET http://localhost:8000/querystring-params?param1=value1 param2: param3: a=b param4: 1,2,3 -$top:5 +$top: 5 HTTP 200 # encoding slash GET http://localhost:8000/querystring-params-encoded?value1=/&value2=%2F [QueryStringParams] -value3:/ +value3: / HTTP 200 diff --git a/integration/tests_ok/test.1.html b/integration/tests_ok/test.1.html index 71f3bd167..e460aee8c 100644 --- a/integration/tests_ok/test.1.html +++ b/integration/tests_ok/test.1.html @@ -1,4 +1,5 @@
GET http://localhost:8000/hello
 
 HTTP 200
-`Hello World!`
+`Hello World!` +
diff --git a/integration/tests_ok/test.1.hurl b/integration/tests_ok/test.1.hurl index b727843ab..19f3b0475 100644 --- a/integration/tests_ok/test.1.hurl +++ b/integration/tests_ok/test.1.hurl @@ -1,4 +1,4 @@ GET http://localhost:8000/hello HTTP 200 -`Hello World!` \ No newline at end of file +`Hello World!` diff --git a/integration/tests_ok/test.2.html b/integration/tests_ok/test.2.html index 71f3bd167..e460aee8c 100644 --- a/integration/tests_ok/test.2.html +++ b/integration/tests_ok/test.2.html @@ -1,4 +1,5 @@
GET http://localhost:8000/hello
 
 HTTP 200
-`Hello World!`
+`Hello World!` + diff --git a/integration/tests_ok/test.2.hurl b/integration/tests_ok/test.2.hurl index b727843ab..19f3b0475 100644 --- a/integration/tests_ok/test.2.hurl +++ b/integration/tests_ok/test.2.hurl @@ -1,4 +1,4 @@ GET http://localhost:8000/hello HTTP 200 -`Hello World!` \ No newline at end of file +`Hello World!` diff --git a/integration/tests_ok/test.3.html b/integration/tests_ok/test.3.html index 71f3bd167..e460aee8c 100644 --- a/integration/tests_ok/test.3.html +++ b/integration/tests_ok/test.3.html @@ -1,4 +1,5 @@
GET http://localhost:8000/hello
 
 HTTP 200
-`Hello World!`
+`Hello World!` + diff --git a/integration/tests_ok/test.3.hurl b/integration/tests_ok/test.3.hurl index b727843ab..19f3b0475 100644 --- a/integration/tests_ok/test.3.hurl +++ b/integration/tests_ok/test.3.hurl @@ -1,4 +1,4 @@ GET http://localhost:8000/hello HTTP 200 -`Hello World!` \ No newline at end of file +`Hello World!` diff --git a/integration/tests_ok/bom.curl b/integration/tests_ok_not_linted/bom.curl similarity index 100% rename from integration/tests_ok/bom.curl rename to integration/tests_ok_not_linted/bom.curl diff --git a/integration/tests_ok/bom.html b/integration/tests_ok_not_linted/bom.html similarity index 100% rename from integration/tests_ok/bom.html rename to integration/tests_ok_not_linted/bom.html diff --git a/integration/tests_ok/bom.hurl b/integration/tests_ok_not_linted/bom.hurl similarity index 100% rename from integration/tests_ok/bom.hurl rename to integration/tests_ok_not_linted/bom.hurl diff --git a/integration/tests_ok/bom.json b/integration/tests_ok_not_linted/bom.json similarity index 100% rename from integration/tests_ok/bom.json rename to integration/tests_ok_not_linted/bom.json diff --git a/integration/tests_ok/bom.ps1 b/integration/tests_ok_not_linted/bom.ps1 similarity index 58% rename from integration/tests_ok/bom.ps1 rename to integration/tests_ok_not_linted/bom.ps1 index 9fa7d21b7..53ed7a061 100644 --- a/integration/tests_ok/bom.ps1 +++ b/integration/tests_ok_not_linted/bom.ps1 @@ -1,3 +1,3 @@ Set-StrictMode -Version latest $ErrorActionPreference = 'Stop' -hurl tests_ok/bom.hurl --verbose +hurl tests_ok_not_linted/bom.hurl --verbose diff --git a/integration/tests_ok/bom.py b/integration/tests_ok_not_linted/bom.py similarity index 100% rename from integration/tests_ok/bom.py rename to integration/tests_ok_not_linted/bom.py diff --git a/integration/tests_ok_not_linted/bom.sh b/integration/tests_ok_not_linted/bom.sh new file mode 100755 index 000000000..33456061b --- /dev/null +++ b/integration/tests_ok_not_linted/bom.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -Eeuo pipefail +hurl tests_ok_not_linted/bom.hurl --verbose diff --git a/integration/tests_ok/bom.windows.curl b/integration/tests_ok_not_linted/bom.windows.curl similarity index 100% rename from integration/tests_ok/bom.windows.curl rename to integration/tests_ok_not_linted/bom.windows.curl