Introduce tests using fixtures from the ipld/ipld repo. #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I've added fixtures for dag-jose to the ipld/ipld repo. This diff adds code to run them; and a git submodule which drags in the ipld/ipld repo (so we've got something to run).
The fixtures themselves are materially the same as some other fixtures already used in another repo, but I've put them in a new format, and added some more kinds of related fixtures which I hope will increase legibility significantly.
The code both runs the test fixtures, and is also capable of regenerating them (or at least, some of them -- not the initial dag-jose itself (where would it come from?)). To do the later, simply run
go test ./dagjose/ -testmark.regen
. (This is quite literally how I produced the rest of the data in ipld/ipld#151 .)(A git submodule? Yes. I think this is the least bad way to solve this linkage. Counterproposals welcome, though. I know many people don't consider them a joy to maintain.)
How Has This Been Tested?
The entire PR is tests :)
For the data: seealso ipld/ipld#151 . (That review is probably more critical than this one!)
Definition of Done
Before submitting this PR, please make sure: