Skip to content

Commit

Permalink
Add integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcamiel committed Aug 11, 2022
1 parent d105917 commit f3d53b7
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration/ssl/options.curl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
curl 'https://localhost:8001/hello' --insecure
curl 'https://localhost:8001/hello' --insecure

16 changes: 16 additions & 0 deletions integration/ssl/options.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
GET https://localhost:8001/hello
[Options]
insecure: true

HTTP/* 200
```Hello World!```


GET https://localhost:8001/hello
[Options]
# Test that options overridden is possible, last is the winner.
insecure: false
insecure: true

HTTP/* 200
```Hello World!```
7 changes: 7 additions & 0 deletions integration/tests_error_parser/options_insecure.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
error: Parsing literal
--> tests_error_parser/options_insecure.hurl:3:11
|
3 | insecure: foo
| ^ expecting 'true|false'
|

1 change: 1 addition & 0 deletions integration/tests_error_parser/options_insecure.exit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2
5 changes: 5 additions & 0 deletions integration/tests_error_parser/options_insecure.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GET http://localhost:8000
[Options]
insecure: foo

HTTP/* *
1 change: 1 addition & 0 deletions integration/tests_ok/options.curl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
curl 'http://localhost:8000/hello'
7 changes: 7 additions & 0 deletions integration/tests_ok/options.html
Original file line number Diff line number Diff line change
@@ -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/hello</span></span>
<span class="line section-header">[Options]</span>
<span class="line"></span><span class="comment"># Option insecure has no effect on HTTP endpoint</span>
<span class="line"><span class="string">insecure</span><span>:</span> <span class="boolean">false</span></span>
</span><span class="response"><span class="line"></span>
<span class="line"><span class="version">HTTP/*</span> <span class="number">200</span></span>
<span class="raw"><span class="line">```Hello World!```</span></span></span></span></code></pre>
7 changes: 7 additions & 0 deletions integration/tests_ok/options.hurl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GET http://localhost:8000/hello
[Options]
# Option insecure has no effect on HTTP endpoint
insecure: false

HTTP/* 200
```Hello World!```
1 change: 1 addition & 0 deletions integration/tests_ok/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"entries":[{"request":{"method":"GET","url":"http://localhost:8000/hello"},"response":{"status":200,"body":{"type":"raw-string","value":"Hello World!"}}}]}
1 change: 1 addition & 0 deletions integration/tests_ok/options.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello World!

0 comments on commit f3d53b7

Please sign in to comment.