-
Notifications
You must be signed in to change notification settings - Fork 473
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
Showing
18 changed files
with
65 additions
and
31 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
integration/hurl/tests_ok/assert_base64.out → integration/hurl/tests_ok/assert_body.bin
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
line1 | ||
line2 | ||
line2 | ||
line3 |
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 @@ | ||
curl 'http://localhost:8000/assert-body' | ||
curl 'http://localhost:8000/assert-body' | ||
curl 'http://localhost:8000/assert-body-with-crlf' | ||
curl 'http://localhost:8000/assert-body' |
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,35 @@ | ||
# Implicit body asserts (base64, multiline, file): | ||
|
||
GET http://localhost:8000/assert-body | ||
HTTP 200 | ||
``` | ||
line1 | ||
line2 | ||
line3 | ||
``` | ||
|
||
GET http://localhost:8000/assert-body | ||
HTTP 200 | ||
file,assert_body.bin; | ||
|
||
|
||
# Test body response with line ending LF and CRLF. | ||
# We receive the text body "line1\nline2\r\nline3\n" | ||
# | ||
# $ printf "line1\nline2\r\nline3\n" | base64 | ||
# bGluZTEKbGluZTINCmxpbmUzCg== | ||
|
||
GET http://localhost:8000/assert-body-with-crlf | ||
HTTP 200 | ||
base64,bGluZTEKbGluZTINCmxpbmUzCg==; | ||
|
||
|
||
# Explicit body asserts | ||
|
||
GET http://localhost:8000/assert-body | ||
HTTP 200 | ||
[Asserts] | ||
body == "line1\nline2\nline3\n" | ||
bytes == file,assert_body.bin; | ||
bytes == hex,6c696e65310a6c696e65320a6c696e65330a; | ||
|
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 @@ | ||
line1 | ||
line2 | ||
line3 |
2 changes: 1 addition & 1 deletion
2
integration/hurl/tests_ok/assert_base64.ps1 → integration/hurl/tests_ok/assert_body.ps1
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
hurl tests_ok/assert_base64.hurl --verbose | ||
hurl --verbose tests_ok/assert_body.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,11 @@ | ||
from app import app | ||
|
||
|
||
@app.route("/assert-body") | ||
def assert_body(): | ||
return "line1\nline2\nline3\n" | ||
|
||
|
||
@app.route("/assert-body-with-crlf") | ||
def assert_body_with_crlf(): | ||
return "line1\nline2\r\nline3\n" |
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 --verbose tests_ok/assert_body.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
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