Skip to content

Commit

Permalink
Add SetAllowedOrigins race test case
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
  • Loading branch information
rht committed Jan 21, 2016
1 parent b970681 commit dba2816
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/sharness/t0060-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dba2816

Please sign in to comment.