Skip to content

Implement tooling to document hardcoded CIDs #112

@laurentsenta

Description

@laurentsenta

See the changes in #87

We used fixtures + libraries to generate expectation values (like an expected payload or an expected CIDs)
But in some (most?) cases, this relies on the fact that the library itself is correct.

Take a test that verifies the ordering of blocks in a CAR produced by a gateway, if we use go-ipld-xyz to load the car and generate the array of blocks, then we test against the library, not against the spec.

The other option is to hardcode results (like arrays of CIDs) which is okay up to a point where we have dozens of long lists of random strings and one test breaks or we have to update it.

Ideally we'd have some way to describe CIDs & other payloads like documentation and load these in the code, similar to how we do DNS link configurations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions