From dba2816d350cff75791d8a6dc4041a062bac0c63 Mon Sep 17 00:00:00 2001 From: rht Date: Thu, 17 Dec 2015 00:07:10 +0700 Subject: [PATCH] Add SetAllowedOrigins race test case License: MIT Signed-off-by: rht --- test/sharness/t0060-daemon.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/sharness/t0060-daemon.sh b/test/sharness/t0060-daemon.sh index f793b5780965..e257e5c65d5b 100755 --- a/test/sharness/t0060-daemon.sh +++ b/test/sharness/t0060-daemon.sh @@ -44,6 +44,16 @@ test_expect_success "ipfs peer id looks good" ' test_check_peerid "$PEERID" ' +# this is for checking SetAllowedOrigins race condition for the api and gateway +# See https://github.com/ipfs/go-ipfs/pull/1966 +test_expect_success "ipfs API works with the correct allowed origin port" ' + curl -X GET -H "Origin:http://localhost:$PORT_API" -I "http://localhost:$PORT_API/api/v0/version" +' + +test_expect_success "ipfs gateway works with the correct allowed origin port" ' + curl -X GET -H "Origin:http://localhost:$PORT_GWAY" -I "http://localhost:$PORT_GWAY/api/v0/version" +' + # This is like t0020-init.sh "ipfs init output looks good" # # Unfortunately the line: