Fixes nc on macOS not closing socket when the stdin sends EOF
Uses `-d` option that is supported both by BSD and GNU nc. License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
Jakub Sztandera committed
Dec 16, 2016 at 21:10 UTC
20665fc5e3b3419da130adfc6d13ed533885e775
1 file changed
+3
-1
test/sharness/t0235-cli-request.sh
+3
-1
@@ -11,7 +11,9 @@ test_description="test http requests made by cli"
11
test_init_ipfs
12
13
test_expect_success "can make http request against nc server" '
14
- go-sleep 0.5s | nc -l 5005 > nc_out &
14
+ nc -ld 5005 > nc_out &
15
+ NCPID=$!
16
+ go-sleep 0.5s && kill "$NCPID" &
17
ipfs cat /ipfs/Qmabcdef --api /ip4/127.0.0.1/tcp/5005 || true
18
'
19