Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Rataj <[email protected]>
  • Loading branch information
hacdias and lidel authored Jun 7, 2023
1 parent 9f9652f commit c9c99a0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/t0118_gateway_car_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,8 @@ func TestGatewayCarDagScopeEntity(t *testing.T) {
{
Name: "GET CAR with dag-scope=entity of a UnixFS directory",
Hint: `
dag-scope=entity should return a CAR file with all the blocks needed to 'cat'
a UnixFS file at the end of the specified path, or to 'ls' a UnixFS directory
at the end of the specified path.
dag-scope=entity for a directory should return a CAR file with all of the path blocks, as well
as all of the blocks for directory enumeration, but not any of blocks for items below the directory.
`,
Request: Request().
Path("/ipfs/{{cid}}", subdirTwoSingleBlockFilesFixture.MustGetCidWithCodec(0x70)).
Expand Down Expand Up @@ -288,7 +287,7 @@ func TestGatewayCarDagScopeEntity(t *testing.T) {
Name: "GET CAR with dag-scope=entity of DAG-CBOR with Links",
Hint: `
dag-scope=entity of a DAG-CBOR (or DAG-JSON) document with IPLD Links must return
all necessary blocks to verify the path, but not the content of the IPLD Links.
all necessary blocks to verify the path, the document itself, but not the content of the IPLD Links.
`,
Request: Request().
Path("/ipfs/{{cid}}/document", dirWithDagCborWithLinksFixture.MustGetCidWithCodec(0x70)).
Expand Down Expand Up @@ -320,8 +319,8 @@ func TestGatewayCarDagScopeAll(t *testing.T) {
{
Name: "GET CAR with dag-scope=all of UnixFS directory with multiple files",
Hint: `
dag-scope=all should return a CAR file with the entire contiguous DAG
that begins at the end of the path query, after blocks required to verify path segments.
dag-scope=all should return a blocks required to verify path, and then
all blocks for the entire UnixFS directory DAG (all children, recursively).
`,
Request: Request().
Path("/ipfs/{{cid}}/subdir", subdirWithMixedBlockFiles.MustGetCidWithCodec(0x70)).
Expand Down Expand Up @@ -411,7 +410,7 @@ func TestGatewayCarEntityBytes(t *testing.T) {
{
Name: "GET CAR with entity-bytes of a UnixFS directory",
Hint: `
dag-scope=entity&entity-bytes=X:Y should return a CAR file with all the blocks needed to 'ls'
dag-scope=entity&entity-bytes=from:to should return a CAR file with all the blocks needed to enumerate contents of
a UnixFS directory at the end of the specified path if the terminal element is a directory
(i.e. entity-bytes is effectively optional if the entity is not a file)
`,
Expand Down

0 comments on commit c9c99a0

Please sign in to comment.