Skip to content

Commit adac281

Browse files
committed
Simplified output of test script
1 parent f9fe333 commit adac281

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

test/simple-reply.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
#!/bin/sh
22

3-
dd if=/dev/urandom of=/tmp/reply bs=1M count=1
4-
cat /tmp/reply | nc -w 5 -L -p 8811 &
5-
backend=$!
3+
dd if=/dev/urandom of=/tmp/reply bs=1M count=1 2>/dev/null
4+
cat /tmp/reply | nc -w 5 -l -p 8811 &
65

76
"$1" -hosting "localhost:8800" -forward "localhost:8811" &
87
proxy=$!
98

109
sleep 1
11-
echo "Making request"
1210
SUM=$( nc localhost 8800 | md5sum)
1311

1412
echo -e "Gotten: \t $SUM"
1513
EXPECTED_SUM=$(cat /tmp/reply | md5sum )
1614
echo -e "Expected: \t $EXPECTED_SUM"
1715

1816
kill $proxy || true
19-
kill $backend || true
2017

2118

2219
if [ "$SUM" = "$EXPECTED_SUM" ]; then

0 commit comments

Comments
 (0)