-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78ac032
commit b9a2ffe
Showing
21 changed files
with
598 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
error: Invalid variable type | ||
--> tests_failed/options_template.hurl:6:13 | ||
| | ||
6 | location: {{redirect}} | ||
| ^^^^^^^^ expecting boolean, actual value is <10> | ||
| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Invalid type at runtime | ||
|
||
GET http://localhost:8000/unused | ||
[Options] | ||
variable: redirect=10 | ||
location: {{redirect}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
hurl tests_failed/options_template.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
hurl tests_failed/options_template.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<pre><code class="language-hurl"><span class="hurl-entry"><span class="request"><span class="line"></span><span class="comment"># Reuse existing tests with options</span> | ||
<span class="line"></span><span class="comment"># using template</span> | ||
<span class="line"></span> | ||
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/redirect-absolute</span></span> | ||
<span class="line"><span class="section-header">[Options]</span></span> | ||
<span class="line"><span class="string">variable</span>: redirect=<span class="boolean">true</span></span> | ||
<span class="line"><span class="string">location</span>: <span class="expr">{{redirect}}</span></span> | ||
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span> | ||
<span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/delay-init</span></span> | ||
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> | ||
</span></span><span class="hurl-entry"><span class="request"><span class="line"><span class="method">GET</span> <span class="url">http://localhost:8000/delay</span></span> <span class="comment"># This request must reach the server at least 1000ms after the previous request</span> | ||
<span class="line"><span class="section-header">[Options]</span></span> | ||
<span class="line"><span class="string">variable</span>: duration=<span class="number">1000</span></span> | ||
<span class="line"><span class="string">delay</span>: <span class="expr">{{duration}}</span></span> | ||
</span><span class="response"><span class="line"><span class="version">HTTP</span> <span class="number">200</span></span> | ||
</span></span><span class="hurl-entry"><span class="request"><span class="line"></span> | ||
<span class="line"><span class="method">GET</span> <span class="url">http://bar.com:8000/resolve</span></span> | ||
<span class="line"><span class="section-header">[Options]</span></span> | ||
<span class="line"><span class="string">variable</span>: port=<span class="number">8000</span></span> | ||
<span class="line"><span class="string">resolve</span>: <span class="string">bar.com:{{port}}:127.0.0.1</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">`Hello World!`</span></span> | ||
</span></span></code></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Reuse existing tests with options | ||
# using template | ||
|
||
GET http://localhost:8000/redirect-absolute | ||
[Options] | ||
variable: redirect=true | ||
location: {{redirect}} | ||
|
||
GET http://localhost:8000/delay-init | ||
HTTP 200 | ||
GET http://localhost:8000/delay # This request must reach the server at least 1000ms after the previous request | ||
[Options] | ||
variable: duration=1000 | ||
delay: {{duration}} | ||
HTTP 200 | ||
|
||
GET http://bar.com:8000/resolve | ||
[Options] | ||
variable: port=8000 | ||
resolve: bar.com:{{port}}:127.0.0.1 | ||
HTTP 200 | ||
`Hello World!` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/redirect-absolute","options":[{"name":"variable","value":"redirect=true"},{"name":"location","value":"{{redirect}}"}]}},{"request":{"method":"GET","url":"http://localhost:8000/delay-init"},"response":{"status":200}},{"request":{"method":"GET","url":"http://localhost:8000/delay","options":[{"name":"variable","value":"duration=1000"},{"name":"delay","value":"{{duration}}"}]},"response":{"status":200}},{"request":{"method":"GET","url":"http://bar.com:8000/resolve","options":[{"name":"variable","value":"port=8000"},{"name":"resolve","value":"bar.com:{{port}}:127.0.0.1"}]},"response":{"status":200,"body":{"type":"text","value":"Hello World!"}}}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
hurl tests_ok/options_template.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
hurl tests_ok/options_template.hurl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.