Add integration test for --output per request option.

This commit is contained in:
jcamiel 2023-11-30 18:00:08 +01:00
parent 35b1bcf24f
commit f2c5198ff2
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
5 changed files with 23 additions and 0 deletions

View 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'

View 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

View File

@ -0,0 +1 @@
Response endpoint1

View 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

View 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