Gateway conformance tests for @helia/verified-fetch
Runs Gateway Conformance tests against @helia/verified-fetch using Kubo as a backing trustless-gateway.
$ npm i @helia/verified-fetch-gateway-conformance
$ VERIFIED_FETCH=@helia/verified-fetch@1.x.x-6f8c15b verified-fetch-gateway-conformance
$ npm i @helia/verified-fetch-gateway-conformance
$ KUBO_BINARY=/path/to/kubo verified-fetch-gateway-conformance
$ GWC_IMAGE=ghcr.io/ipfs/gateway-conformance:v0.5.1 verified-fetch-gateway-conformance
$ DEBUG="-mocha*,*,*:trace" npm run test # very verbose output
$ DEBUG="conformance-tests*,conformance-tests*:trace" npm run test # only gateway-conformance test output
$ npm run build
$ node dist/src/demo-server.js # in terminal 1
$ curl -v GET http://localhost:3442/ipfs/bafkqabtimvwgy3yk/ # in terminal 2
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
$ npm i @helia/verified-fetch-gateway-conformance
Licensed under either of
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.
Runs Gateway Conformance tests against @helia/verified-fetch using Kubo as a backing trustless-gateway.
Example: Testing a new @helia/verified-fetch release
Example: Testing with a different Kubo version
Example: using a different gateway-conformance image
Example: Debugging a test run
Example: querying the gateway-conformance server directly
Troubleshooting
Missing file in gateway-conformance-fixtures folder
If you see the following error:
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