mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 20:12:09 +03:00
Add integration test for --output per request option.
This commit is contained in:
parent
35b1bcf24f
commit
f2c5198ff2
2
integration/tests_ok/output_option.curl
Normal file
2
integration/tests_ok/output_option.curl
Normal file
@ -0,0 +1,2 @@
|
||||
curl --header 'Content-Type: application/json' --data '{ "user": "bob" }' --output build/output_request_1.bin 'http://localhost:8000/output/endpoint1'
|
||||
curl 'http://localhost:8000/output/endpoint2'
|
8
integration/tests_ok/output_option.hurl
Normal file
8
integration/tests_ok/output_option.hurl
Normal file
@ -0,0 +1,8 @@
|
||||
POST http://localhost:8000/output/endpoint1
|
||||
[Options]
|
||||
output: build/output_request_1.bin
|
||||
{ "user": "bob" }
|
||||
HTTP 200
|
||||
|
||||
GET http://localhost:8000/output/endpoint2
|
||||
HTTP 200
|
1
integration/tests_ok/output_option.out
Normal file
1
integration/tests_ok/output_option.out
Normal file
@ -0,0 +1 @@
|
||||
Response endpoint1
|
7
integration/tests_ok/output_option.ps1
Normal file
7
integration/tests_ok/output_option.ps1
Normal file
@ -0,0 +1,7 @@
|
||||
Set-StrictMode -Version latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
if (Test-Path build/output_request_1.bin) {
|
||||
Remove-Item build/output_request_1.bin
|
||||
}
|
||||
hurl --no-output tests_ok/output_option.hurl
|
||||
Write-Host (Get-Content build/output_request_1.bin -Raw) -NoNewLine
|
5
integration/tests_ok/output_option.sh
Executable file
5
integration/tests_ok/output_option.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
rm -f build/output_request_1.bin
|
||||
hurl --no-output tests_ok/output_option.hurl
|
||||
cat build/output_request_1.bin
|
Loading…
Reference in New Issue
Block a user