Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dag-pb fixtures #2

Merged
merged 1 commit into from
Aug 5, 2021
Merged

feat: add dag-pb fixtures #2

merged 1 commit into from
Aug 5, 2021

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Aug 5, 2021

Closes: #1

Most of these fixtures are from js-dag-pb and go-dag-pb and some of them are even inherited from older dag-pb implementations. They test basic forms and some specific (tricky) edge cases.

For the fixtures that are dag-pb specific data model forms ({ Data: bytes, Links: [...] }), we now have the fixtures and their correct CIDs in the 3 different codecs being tested here. So for each version we decode it into the data model form, encode what we've ended up with with each of the 3 codecs and check that the CIDs match. So we get pretty good coverage of both decode and encode and the ability of implementations to properly represent the data model forms in memory.

For Go: pulls in github.com/ipld/go-codec-dagpb, make the codec mapping more generic and remove hardwiring of most instances of dagjson and dagpb. Now better set up for pulling in arbitrary codecs in both JS & Go.

Closes: #1

For Go: pulls in github.com/ipld/go-codec-dagpb, make the codec mapping
more generic and remove hardwiring of most instances of dagjson
and dagpb. Now better set up for pulling in arbitrary codecs in both JS
& Go.
@rvagg rvagg merged commit c2672f3 into master Aug 5, 2021
@rvagg rvagg deleted the rvagg/dagpb branch August 5, 2021 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DAG-PB fixtures
1 participant