Skip to content

Commit c95f5c9

Browse files
committed
test(gw): index.html with go-get=1
This adds a missing test for #3963
1 parent bcab64d commit c95f5c9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/sharness/t0110-gateway.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ test_expect_success "GET IPFS directory with index.html returns redirect to add
7575
test_should_contain \"Location: /ipfs/$HASH2/dirwithindex/?query=to-remember\" response_without_slash
7676
"
7777

78+
# This enables go get to parse go-import meta tags from index.html files stored in IPFS
79+
# https://github.com/ipfs/kubo/pull/3963
80+
test_expect_success "GET IPFS directory with index.html and no trailing slash returns expected output when go-get is passed" "
81+
curl -s -o response_with_slash \"http://127.0.0.1:$port/ipfs/$HASH2/dirwithindex?go-get=1\" &&
82+
test_should_contain \"hello i am a webpage\" response_with_slash
83+
"
84+
7885
test_expect_success "GET IPFS directory with index.html and trailing slash returns expected output" "
7986
curl -s -o response_with_slash \"http://127.0.0.1:$port/ipfs/$HASH2/dirwithindex/?query=to-remember\" &&
8087
test_should_contain \"hello i am a webpage\" response_with_slash

0 commit comments

Comments
 (0)