Skip to content
This repository has been archived by the owner on Nov 9, 2019. It is now read-only.

Rewrite scripts/test.sh into actual Rust tests #5

Open
radu-matei opened this issue Jun 23, 2019 · 0 comments
Open

Rewrite scripts/test.sh into actual Rust tests #5

radu-matei opened this issue Jun 23, 2019 · 0 comments

Comments

@radu-matei
Copy link
Member

One of the goals of this implementation is to be fully compatible with the Go implementation of a canonical JSON serializer used today in Docker and TUF/Notary, and scripts/test.sh is an early attempt at making sure the SHA256 sum of files generated by this implementation matches the one of files generated by the Go implementation.

However, the current Bash implementation is not ideal, and should be reworked into Rust tests - in order to achieve this:

  • add the canonical JSON representation of the files in testdata into testdata/canonical
  • the Rust tests would read the initial JSON, serialize in in canonical form, and calculate the SHA 256 sum of the output, then compare it with the Go implementation.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant