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 Dec 18, 2015
1 parent 98fb3cc commit f98f7b1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/sharness/t0060-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ 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" '
echo $PORT_API &&
curl -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" '
echo $PORT_GWAY &&
curl -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 f98f7b1

Please sign in to comment.