Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
264d9d60
Commit
264d9d60
authored
Oct 10, 2018
by
Dr Ian Preston
Committed by
Steven Allen
Nov 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix remaining sharness tests
License: MIT Signed-off-by:
Ian Preston
<
ianopolous@protonmail.com
>
parent
a818b436
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
test/sharness/t0184-http-proxy-over-p2p.sh
test/sharness/t0184-http-proxy-over-p2p.sh
+7
-1
No files found.
test/sharness/t0184-http-proxy-over-p2p.sh
View file @
264d9d60
...
@@ -64,6 +64,11 @@ function teardown_sender_and_receiver() {
...
@@ -64,6 +64,11 @@ function teardown_sender_and_receiver() {
sleep
5
sleep
5
}
}
function
teardown_remote_server
()
{
kill
-9
$REMOTE_SERVER_PID
>
/dev/null 2>&1
sleep
5
}
function
curl_check_response_code
()
{
function
curl_check_response_code
()
{
local
expected_status_code
=
$1
local
expected_status_code
=
$1
local
path_stub
=
${
2
:-
http
/
$RECEIVER_ID
/test/index.txt
}
local
path_stub
=
${
2
:-
http
/
$RECEIVER_ID
/test/index.txt
}
...
@@ -117,10 +122,11 @@ setup_sender_and_receiver_ipfs &&
...
@@ -117,10 +122,11 @@ setup_sender_and_receiver_ipfs &&
curl_send_proxy_request_and_check_response 404 "SORRY GUYS, I LOST IT"
curl_send_proxy_request_and_check_response 404 "SORRY GUYS, I LOST IT"
'
'
teardown_sender_and_receiver
teardown_sender_and_receiver
teardown_remote_server
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
404
""
curl_send_proxy_request_and_check_response
502
""
'
'
teardown_sender_and_receiver
teardown_sender_and_receiver
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment