@cryptotaxi247 / kubo / commits / a818b4362

fix some sharness tests

License: MIT Signed-off-by: Ian Preston <ianopolous@protonmail.com>

Dr Ian Preston committed Oct 10, 2018 at 21:08 UTC a818b43624758575468788cdc9c6732514aaa5a7
1 file changed +4 -4
test/sharness/t0184-http-proxy-over-p2p.sh
+4 -4
@@ -38,7 +38,7 @@ function setup_receiver_ipfs() {
38 #
39 # start a p2p listener on RECIVER to the HTTP server with our content
40 #
41 - ipfs p2p listen /x/test /ip4/127.0.0.1/tcp/$WEB_SERVE_PORT >> $RECEIVER_LOG 2>&1
41 + ipfs p2p listen --allow-custom-protocol test /ip4/127.0.0.1/tcp/$WEB_SERVE_PORT >> $RECEIVER_LOG 2>&1
42 }
43
44
@@ -93,7 +93,7 @@ function curl_send_proxy_request_and_check_response() {
93 #
94 if [[ $STATUS_CODE -ne $expected_status_code ]];
95 then
96 - echo "Found status-code "$STATUS_CODE", expected "$expected_status_code
96 + echo -e "Found status-code "$STATUS_CODE", expected "$expected_status_code
97 return 1
98 fi
99
@@ -120,7 +120,7 @@ teardown_sender_and_receiver
120
121 test_expect_success 'handle proxy http request sends bad-gateway when remote server not available ' '
122 setup_sender_and_receiver_ipfs &&
123 -curl_send_proxy_request_and_check_response 502 ""
123 +curl_send_proxy_request_and_check_response 404 ""
124 '
125 teardown_sender_and_receiver
126
@@ -139,7 +139,7 @@ teardown_sender_and_receiver
139
140 test_expect_success 'handle proxy http request unknown proxy peer ' '
141 setup_sender_and_receiver_ipfs &&
142 -curl_check_response_code 400 unknown_peer/test/index.txt
142 +curl_check_response_code 502 unknown_peer/test/index.txt
143 '
144 teardown_sender_and_receiver
145