Skip to content

Commit

Permalink
t0124: clear (b)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Jun 28, 2023
1 parent fcbd3cd commit 53b6ccf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/subdomain_gateway_ipfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func TestGatewaySubdomains(t *testing.T) {
)),
},
{
Name: "request for deep path resource at {cid}.ipfs.localhost/sub/dir/file",
Name: "request for deep path resource at {cid}.ipfs.example.com/sub/dir/file",
Request: Request().URL("{{scheme}}://{{cid}}.ipfs.{{host}}/ipfs/ipns/bar", u.Scheme, DirCID, u.Host),
Response: Expect().
Status(200).
Expand Down Expand Up @@ -294,15 +294,15 @@ func TestGatewaySubdomains(t *testing.T) {
),
},
{
Name: "request for a too long CID at localhost/ipfs/{CIDv1} returns human readable error",
Name: "request for a too long CID at example.com/ipfs/{CIDv1} returns human readable error",
Hint: "router should not redirect to hostnames that could fail due to DNS limits",
Request: Request().URL("{{url}}/ipfs/{{cid}}", gatewayURL, CIDv1_TOO_LONG),
Response: Expect().
Status(400).
Body(Contains("CID incompatible with DNS label length limit of 63")),
},
{
Name: "request for a too long CID at {CIDv1}.ipfs.localhost returns expected payload",
Name: "request for a too long CID at {CIDv1}.ipfs.example.com returns expected payload",
Hint: "direct request should also fail (provides the same UX as router and avoids confusion)",
Request: Request().URL("{{scheme}}://{{cid}}.ipfs.{{host}}/", u.Scheme, CIDv1_TOO_LONG, u.Host),
Response: Expect().
Expand Down
1 change: 1 addition & 0 deletions tests/subdomain_gateway_ipns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ func TestSubdomainGatewayDNSLinkInlining(t *testing.T) {
Name: `request for example.com/ipns/?uri=ipns%3A%2F%2F.. produces redirect to /ipns/.. content path`,
Hint: "Support ipns:// in https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler",
Request: Request().
// TODO: use Query or future QueryRaw here
URL(`{{url}}/ipns/?uri=ipns%3A%2F%2F{{dnslink}}`, gatewayURL, wikipedia),
Response: Expect().
Headers(
Expand Down

0 comments on commit 53b6ccf

Please sign in to comment.