twister

HTTP fault injector for testing
Log | Files | Refs | README | LICENSE

commit 7d9642f7995d8e2d1f0fb08eeb235e4b6139da46
parent 65bd48c64d3034530b2ce2908d4b862edd96e96c
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Mon, 20 May 2019 18:42:59 +0200

Resolve #5726

Diffstat:
Asrc/test/body.json | 2++
Asrc/test/body.json.deflate | 0
Msrc/test/test_twister.sh | 11++++++++---
3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/test/body.json b/src/test/body.json @@ -0,0 +1 @@ +{"bo":"dy"} +\ No newline at end of file diff --git a/src/test/body.json.deflate b/src/test/body.json.deflate Binary files differ. diff --git a/src/test/test_twister.sh b/src/test/test_twister.sh @@ -145,12 +145,17 @@ if ! test '{"hello":"world"}' = $cum_mods; then fi # check if Twister does compression. -status_code=$(curl -s "${TWISTER_URL}deflate-test" \ - --compressed -o /dev/null -w "%{http_code}") +status_code=$(curl \ + -s "${TWISTER_URL}deflate-test" \ + -o /dev/null \ + -H "Content-Encoding: deflate" \ + -H "Content-Type: application/json" \ + --data-binary @body.json.deflate \ + -w "%{http_code}") # check status code is okay. if ! test 200 = $status_code; then - echo "Compression failed." + echo "Compression failed (status == ${status_code})." kill $web_server_pid kill $twister_service_pid exit 1