Commit f080158 committed Jan 21, 2016 Unverified
1 parent b970681 commit f080158 Copy full SHA for f080158
File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ test_description="Test daemon command"
8
8
9
9
. lib/test-lib.sh
10
10
11
+ gwyport=8080
12
+ apiport=5001
13
+
11
14
# TODO: randomize ports here once we add --config to ipfs daemon
12
15
13
16
# this needs to be in a different test than "ipfs daemon --init" below
@@ -44,6 +47,16 @@ test_expect_success "ipfs peer id looks good" '
44
47
test_check_peerid "$PEERID"
45
48
'
46
49
50
+ # this is for checking SetAllowedOrigins race condition for the api and gateway
51
+ # See https://github.com/ipfs/go-ipfs/pull/1966
52
+ test_expect_success " ipfs API works with the correct allowed origin port" '
53
+ curl -s -X GET -H "Origin:http://localhost:$apiport" -I "http://localhost:$apiport/api/v0/version"
54
+ '
55
+
56
+ test_expect_success " ipfs gateway works with the correct allowed origin port" '
57
+ curl -s -X GET -H "Origin:http://localhost:$gwyport" -I "http://localhost:$gwyport/api/v0/version"
58
+ '
59
+
47
60
# This is like t0020-init.sh "ipfs init output looks good"
48
61
#
49
62
# Unfortunately the line:
You can’t perform that action at this time.
0 commit comments