Helia Verified Fetch
    Preparing search index...

    Module @helia/verified-fetch-gateway-conformance

    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

    You can generate conformance results independently of the test suite for analysis or reuse:

    # Generate results and keep binary for reuse
    $ npm run gen:gwc-report

    # Generate results with custom name and cleanup binary
    $ npm run gen:gwc-report -- my-test --cleanup

    # Use the results in your own code
    $ node -e "
    import { generateConformanceResults } from './dist/src/generate-conformance-report.js'
    import { getReportDetails } from './dist/src/get-report-details.js'
    const result = await generateConformanceResults('custom', { cleanupBinary: true })
    console.log('Report saved to:', result.reportPath)
    const details = await getReportDetails(result.reportPath)
    console.log('Success rate:', details.successRate)
    "

    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

    Helia logo

    @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.

    $ 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

    You can generate conformance results independently of the test suite for analysis or reuse:

    # Generate results and keep binary for reuse
    $ npm run gen:gwc-report

    # Generate results with custom name and cleanup binary
    $ npm run gen:gwc-report -- my-test --cleanup

    # Use the results in your own code
    $ node -e "
    import { generateConformanceResults } from './dist/src/generate-conformance-report.js'
    import { getReportDetails } from './dist/src/get-report-details.js'
    const result = await generateConformanceResults('custom', { cleanupBinary: true })
    console.log('Report saved to:', result.reportPath)
    const details = await getReportDetails(result.reportPath)
    console.log('Success rate:', details.successRate)
    "

    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.