@cryptotaxi247 / kubo / commits / 0aca2a37e

sharness: fix #4003 test case

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>

Steven Allen committed Jul 27, 2017 at 17:24 UTC 0aca2a37e69c72a766e89e57af1a54b03d132c21
1 file changed +1 -1
test/sharness/t0600-issues-and-regressions-online.sh
+1 -1
@@ -48,7 +48,7 @@ test_expect_success "pin add api looks right - #3753" '
48
49 test_expect_success "no daemon crash on improper file argument - #4003" '
50 FNC=$(echo $API_ADDR | awk -F: '\''{ printf "%s %s", $1, $2 }'\'') &&
51 - 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"
51 + 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"
52 '
53
54 test_kill_ipfs_daemon