Skip to content

Commit 353e18f

Browse files
committed
fix etag test value
1 parent 7f6fc40 commit 353e18f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/internal/itest/trustless_fetch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func TestTrustlessUnixfsFetch(t *testing.T) {
116116
req.Equal("application/vnd.ipld.car;version=1;order=dfs;dups=y", resp.Header.Get("Content-Type"))
117117
req.Equal("nosniff", resp.Header.Get("X-Content-Type-Options"))
118118
etagStart := fmt.Sprintf(`"%s.car.`, tc.Root.String())
119-
etagGot := resp.Header.Get("ETag")
119+
etagGot := strings.TrimPrefix(resp.Header.Get("ETag"), "W/")
120120
req.True(strings.HasPrefix(etagGot, etagStart), "ETag should start with [%s], got [%s]", etagStart, etagGot)
121121
req.Equal(`"`, etagGot[len(etagGot)-1:], "ETag should end with a quote")
122122
req.Equal(fmt.Sprintf("/ipfs/%s%s", tc.Root.String(), trustlessutils.PathEscape(tc.Path)), resp.Header.Get("X-Ipfs-Path"))

0 commit comments

Comments
 (0)