1.4.1 • Published 10 months ago

@helia/verified-fetch-gateway-conformance v1.4.1

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
10 months ago

@helia/verified-fetch-gateway-conformance

ipfs.tech Discuss codecov CI

Gateway conformance tests for @helia/verified-fetch

About

Runs Gateway Conformance tests against @helia/verified-fetch using Kubo as a backing trustless-gateway.

Example - Testing a new @helia/verified-fetch release

$ npm i @helia/verified-fetch-gateway-conformance
$ VERIFIED_FETCH=@helia/verified-fetch@1.x.x-6f8c15b verified-fetch-gateway-conformance

Example - Testing with a different Kubo version

$ npm i @helia/verified-fetch-gateway-conformance
$ KUBO_BINARY=/path/to/kubo verified-fetch-gateway-conformance

Example - using a different gateway-conformance image

$ GWC_IMAGE=ghcr.io/ipfs/gateway-conformance:v0.5.1 verified-fetch-gateway-conformance

Example - Debugging a test run

$ DEBUG="-mocha*,*,*:trace" npm run test # very verbose output
$ DEBUG="conformance-tests*,conformance-tests*:trace" npm run test # only gateway-conformance test output

Example - querying the gateway-conformance server directly

$ npm run build
$ node dist/src/demo-server.js # in terminal 1
$ curl -v GET http://localhost:3442/ipfs/bafkqabtimvwgy3yk/  # in terminal 2

Troubleshooting

Missing file in gateway-conformance-fixtures folder

If you see the following error:

ENOENT: no such file or directory, open '[...]/helia-verified-fetch/packages/gateway-conformance/dist/src/...

This likely means the docker container is not executing properly for some reason. You can try running the following command to see if there are any errors: DEBUG="-mocha*,*,*:trace" npm run test

Install

$ npm i @helia/verified-fetch-gateway-conformance

License

Licensed under either of

Contribute

Contributions welcome! Please check out the issues.

Also see our contributing document for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS Code of Conduct.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

npm.io