Skip to content

Commit

Permalink
Merge branch 'main' into SgtPooki-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki authored May 16, 2024
2 parents b04e535 + 41f88f8 commit f475934
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Relaxed the DAG-CBOR error check: we no longer check the body of the response, only the status code. [PR](https://github.com/ipfs/gateway-conformance/pull/205)

## [0.5.1] - 2024-04-11
- Removed byte range text for DAG-CBOR objects converted to `text/html`. [PR](https://github.com/ipfs/gateway-conformance/pull/202)

## [0.5.0] - 2024-01-25
### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Common operations are possible via reusable GitHub actions:
To learn how to integrate them in the CI of your project, see real world examples in:
- [`kubo/../gateway-conformance.yml`](https://github.com/ipfs/kubo/blob/master/.github/workflows/gateway-conformance.yml) (fixtures imported into tested node)
- [`boxo/../gateway-conformance.yml`](https://github.com/ipfs/boxo/blob/main/.github/workflows/gateway-conformance.yml) (fixtures imported into a sidecar kubo node that is peered with tested library)
- [`bifrost-gateway/../gateway-conformance.yml`](https://github.com/ipfs/bifrost-gateway/blob/main/.github/workflows/gateway-conformance.yml) (fixtures imported into a kubo node that acts as a delegated block backend)
- [`rainbow/../gateway-conformance.yml`](https://github.com/ipfs/rainbow/blob/main/.github/workflows/gateway-conformance.yml) (fixtures imported into a kubo node that acts as a delegated block backend)

### Web Dashboard

Expand Down
2 changes: 1 addition & 1 deletion REPOSITORIES
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ipfs/kubo
ipfs/boxo
ipfs/bifrost-gateway
ipfs/rainbow
34 changes: 3 additions & 31 deletions tests/path_gateway_dag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ func TestPathing(t *testing.T) {
Path("/ipfs/{{cid}}/foo", dagJSONTraversalCID).
Query("format", "dag-json"),
Response: Expect().
Status(501).
Body(Contains("reading IPLD Kinds other than Links (CBOR Tag 42) is not implemented")),
Status(501), // reading IPLD Kinds other than Links (CBOR Tag 42) is not implemented
},
{
Name: "GET DAG-JSON traverses multiple links",
Expand Down Expand Up @@ -396,8 +395,7 @@ func TestPathing(t *testing.T) {
Path("/ipfs/{{cid}}/foo", dagCBORTraversalCID).
Query("format", "dag-cbor"),
Response: Expect().
Status(501).
Body(Contains("reading IPLD Kinds other than Links (CBOR Tag 42) is not implemented")),
Status(501), // reading IPLD Kinds other than Links (CBOR Tag 42) is not implemented
},
{
Name: "GET DAG-CBOR traverses multiple links",
Expand Down Expand Up @@ -694,7 +692,6 @@ func TestNativeDag(t *testing.T) {
RunWithSpecs(t, rangeTests, specs.PathGatewayDAG)
}

var dagCborHTMLRendering []byte
RunWithSpecs(t, SugarTests{
SugarTest{
Name: "Convert application/vnd.ipld.dag-cbor to text/html",
Expand All @@ -704,34 +701,9 @@ func TestNativeDag(t *testing.T) {
Headers(
Header("Accept", "text/html"),
),
Response: Expect().Body(Checks("", func(t []byte) bool {
innerCheck := Contains("</html>").Check(string(t))
if innerCheck.Success {
dagCborHTMLRendering = t
return true
}
return false
})),
Response: Expect().Body(Contains("</html>")),
},
}, specs.PathGatewayDAG)

if dagCborHTMLRendering != nil {
rangeTests := helpers.OnlyRandomRangeTests(t,
SugarTest{
Name: "Convert application/vnd.ipld.dag-cbor to text/html with range request includes correct bytes",
Hint: "",
Request: Request().
Path("/ipfs/{{cid}}/", dagCborCID).
Headers(
Header("Accept", "text/html"),
),
Response: Expect(),
},
dagCborHTMLRendering,
"text/html")

RunWithSpecs(t, rangeTests, specs.PathGatewayDAG)
}
}

func TestGatewayJSONCborAndIPNS(t *testing.T) {
Expand Down

0 comments on commit f475934

Please sign in to comment.