-
Notifications
You must be signed in to change notification settings - Fork 21
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
Included Tests for memory.go LoadEnvelope and Search #59
Conversation
neilnaveen
commented
Oct 25, 2023
•
edited
Loading
edited
- Included tests for LoadEnvelope
- Included tests for Search
6de8947
to
2c162e3
Compare
- Included tests for LoadEnvelope Signed-off-by: neilnaveen <[email protected]>
- Fixed lint issues - Renamed test function to TestLoadEnvelope Signed-off-by: neilnaveen <[email protected]>
- Included test for search function - Cleaned up test for LoadEnvelope Signed-off-by: neilnaveen <[email protected]>
80b40a7
to
cd48450
Compare
source/memory_test.go
Outdated
intotoStatment: intoto.Statement{ | ||
Type: "https://in-toto.io/Statement/v0.1", | ||
Subject: []intoto.Subject{{Name: "example", Digest: map[string]string{"sha256": "exampledigest"}}}, | ||
PredicateType: "https://slsa.dev/provenance/v0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the predicate type we should be setting
source/memory_test.go
Outdated
mSource: NewMemorySource(), | ||
}, | ||
{ | ||
name: "Empty Invalid intotoStatment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that an empty in-toto statement has been provided, but maybe thinking "Invalid" in the test name might not be necessary. A bit of a nit though.
source/memory_test.go
Outdated
{ | ||
Type: "1", | ||
Subject: []intoto.Subject{{Name: "example1", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2", "c": "exampledigest3"}}}, | ||
PredicateType: "https://slsa.dev/provenance/v0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again I think the Predicate Type here is incorrect.
Hi @neilnaveen! Thank you so much for taking the time to add these tests, they're very valuable 😄. Hopefully you can see through the barrage of suggestions, most of them are little suggestions so they shouldn't take any time to review and address. With the exception of the changes that I have outlined, I don't see why we couldn't approve and merge this work for now. For context @neilnaveen we are going to be working over the next couple of months on improving the tests within this repository and https://github.com/in-toto/witness, and this helps us move forward in that regard. |
Signed-off-by: Tom Meadows <[email protected]>
Signed-off-by: Tom Meadows <[email protected]>
Signed-off-by: Tom Meadows <[email protected]>