Skip to content

Commit

Permalink
sharness: fix #4003 test case
Browse files Browse the repository at this point in the history
1. Use printf to reliably expand escape sequences by default.
2. grep needs to exit after the first match as we're using HTTP/1.1 (the remote
side will not close the connection after sending the response).

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Jul 28, 2017
1 parent 4ef73ee commit 0b313c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/sharness/t0600-issues-and-regressions-online.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test_expect_success "pin add api looks right - #3753" '

test_expect_success "no daemon crash on improper file argument - #4003" '
FNC=$(echo $API_ADDR | awk -F: '\''{ printf "%s %s", $1, $2 }'\'') &&
echo -n "POST /api/v0/add?pin=true HTTP/1.1\r\nHost: $API_ADDR\r\nContent-Type: multipart/form-data; boundary=Pyw9xQLtiLPE6XcI\r\nContent-Length: 22\r\n\r\n\r\n--Pyw9xQLtiLPE6XcI\r\n" | nc -v $FNC | grep "200 OK"
printf "POST /api/v0/add?pin=true HTTP/1.1\r\nHost: $API_ADDR\r\nContent-Type: multipart/form-data; boundary=Pyw9xQLtiLPE6XcI\r\nContent-Length: 22\r\n\r\n\r\n--Pyw9xQLtiLPE6XcI\r\n" | nc -v $FNC | grep -m1 "200 OK"
'

test_kill_ipfs_daemon
Expand Down

0 comments on commit 0b313c4

Please sign in to comment.