Commit a818b436 authored by Dr Ian Preston's avatar Dr Ian Preston Committed by Steven Allen

fix some sharness tests

License: MIT
Signed-off-by: default avatarIan Preston <ianopolous@protonmail.com>
parent 654105a2
...@@ -38,7 +38,7 @@ function setup_receiver_ipfs() { ...@@ -38,7 +38,7 @@ function setup_receiver_ipfs() {
# #
# start a p2p listener on RECIVER to the HTTP server with our content # start a p2p listener on RECIVER to the HTTP server with our content
# #
ipfs p2p listen /x/test /ip4/127.0.0.1/tcp/$WEB_SERVE_PORT >> $RECEIVER_LOG 2>&1 ipfs p2p listen --allow-custom-protocol test /ip4/127.0.0.1/tcp/$WEB_SERVE_PORT >> $RECEIVER_LOG 2>&1
} }
...@@ -93,7 +93,7 @@ function curl_send_proxy_request_and_check_response() { ...@@ -93,7 +93,7 @@ function curl_send_proxy_request_and_check_response() {
# #
if [[ $STATUS_CODE -ne $expected_status_code ]]; if [[ $STATUS_CODE -ne $expected_status_code ]];
then then
echo "Found status-code "$STATUS_CODE", expected "$expected_status_code echo -e "Found status-code "$STATUS_CODE", expected "$expected_status_code
return 1 return 1
fi fi
...@@ -120,7 +120,7 @@ teardown_sender_and_receiver ...@@ -120,7 +120,7 @@ teardown_sender_and_receiver
test_expect_success 'handle proxy http request sends bad-gateway when remote server not available ' ' test_expect_success 'handle proxy http request sends bad-gateway when remote server not available ' '
setup_sender_and_receiver_ipfs && setup_sender_and_receiver_ipfs &&
curl_send_proxy_request_and_check_response 502 "" curl_send_proxy_request_and_check_response 404 ""
' '
teardown_sender_and_receiver teardown_sender_and_receiver
...@@ -139,7 +139,7 @@ teardown_sender_and_receiver ...@@ -139,7 +139,7 @@ teardown_sender_and_receiver
test_expect_success 'handle proxy http request unknown proxy peer ' ' test_expect_success 'handle proxy http request unknown proxy peer ' '
setup_sender_and_receiver_ipfs && setup_sender_and_receiver_ipfs &&
curl_check_response_code 400 unknown_peer/test/index.txt curl_check_response_code 502 unknown_peer/test/index.txt
' '
teardown_sender_and_receiver teardown_sender_and_receiver
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment