Add JSON schema for the JSON embedded inside signatures#253
Merged
mtrmac merged 3 commits intocontainers:masterfrom May 10, 2017
Merged
Add JSON schema for the JSON embedded inside signatures#253mtrmac merged 3 commits intocontainers:masterfrom
mtrmac merged 3 commits intocontainers:masterfrom
Conversation
71d45db to
2f0d6ad
Compare
9598926 to
093c0a6
Compare
9e5a473 to
d319585
Compare
d319585 to
37e17f3
Compare
28a88b9 to
1a11ea1
Compare
1a11ea1 to
aace4f3
Compare
04a5e46 to
ca67152
Compare
Note that this is NOT a replacement for the atomic-signature.md documentation. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Instead of an one-shot tryUnmarshalModifiedSignature and testing the resulting error value, use a separate modifiedUntrustedSignatureJSON helper, and a pair of successfullyUnmarshalUntrustedSignature / assertUnmarshalUntrustedSignatureFails helpers for the expected success / failure cases. This does not change behavior right now, but it will make it easier to add testing the JSON schema in the future. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Reuse the existing untrustedSignature.UnmarshalJSON tests. NOTE: The schema at schemaPath is NOT authoritative; docs/atomic-signature.json and the code is, rather! The schemaPath references are not testing that the code follows the behavior declared by the schema, they are testing that the schema follows the behavior of the code! Signed-off-by: Miloslav Trmač <mitr@redhat.com>
ca67152 to
5012539
Compare
Collaborator
Author
|
Now ready for review/merging. |
Member
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This schema is a supplement to
docs/atomic-signature.md, added by #251 ; this PR therefore depends on and includes #251.Also adds some tests for the schema. See individual commit messages for details.
Quoting
descriptioninside the schema: