Skip to content

Commit

Permalink
fix: adjust to new X-Ipfs-Path escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Aug 24, 2023
1 parent d8e8e4a commit dd7309c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/internal/itest/trustless_fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/filecoin-project/lassie/pkg/internal/itest/testpeer"
"github.com/filecoin-project/lassie/pkg/lassie"
httpserver "github.com/filecoin-project/lassie/pkg/server/http"
"github.com/filecoin-project/lassie/pkg/types"
"github.com/google/uuid"
"github.com/ipfs/go-unixfsnode"
"github.com/ipld/go-car/v2"
Expand Down Expand Up @@ -117,7 +118,7 @@ func TestTrustlessUnixfsFetch(t *testing.T) {
etagGot := resp.Header.Get("ETag")
req.True(strings.HasPrefix(etagGot, etagStart), "ETag should start with [%s], got [%s]", etagStart, etagGot)
req.Equal(`"`, etagGot[len(etagGot)-1:], "ETag should end with a quote")
req.Equal(fmt.Sprintf("/ipfs/%s%s", tc.Root.String(), tc.Path), resp.Header.Get("X-Ipfs-Path"))
req.Equal(fmt.Sprintf("/ipfs/%s%s", tc.Root.String(), types.PathEscape(tc.Path)), resp.Header.Get("X-Ipfs-Path"))
requestId := resp.Header.Get("X-Trace-Id")
require.NotEmpty(t, requestId)
_, err = uuid.Parse(requestId)
Expand Down

0 comments on commit dd7309c

Please sign in to comment.