Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Meadows <[email protected]>
  • Loading branch information
ChaosInTheCRD authored Jan 22, 2024
1 parent 326e4aa commit 90f9c28
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions source/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestLoadEnvelope(t *testing.T) {
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",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(predicate),
},
attCol: attestation.Collection{},
Expand All @@ -72,7 +72,7 @@ func TestLoadEnvelope(t *testing.T) {
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",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage("invalid-predicate"),
},
attCol: attestation.Collection{},
Expand All @@ -86,7 +86,7 @@ func TestLoadEnvelope(t *testing.T) {
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",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(predicate),
},
mSource: NewMemorySource(),
Expand Down Expand Up @@ -185,19 +185,19 @@ func TestSearch(t *testing.T) {
{
Type: "1",
Subject: []intoto.Subject{{Name: "example1", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2", "c": "exampledigest3"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "2",
Subject: []intoto.Subject{{Name: "example2", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "3",
Subject: []intoto.Subject{{Name: "example3", Digest: map[string]string{"a": "exampledigest"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
},
Expand All @@ -215,25 +215,25 @@ func TestSearch(t *testing.T) {
{
Type: "1",
Subject: []intoto.Subject{{Name: "example1", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2", "c": "exampledigest3"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "2",
Subject: []intoto.Subject{{Name: "example2", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "3",
Subject: []intoto.Subject{{Name: "example3", Digest: map[string]string{"a": "exampledigest"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "4",
Subject: []intoto.Subject{{Name: "example1", Digest: map[string]string{"a": "not included"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
},
Expand All @@ -251,19 +251,19 @@ func TestSearch(t *testing.T) {
{
Type: "1",
Subject: []intoto.Subject{{Name: "example1", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2", "c": "exampledigest3"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "2",
Subject: []intoto.Subject{{Name: "example2", Digest: map[string]string{"a": "exampledigest", "b": "exampledigest2"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
{
Type: "3",
Subject: []intoto.Subject{{Name: "example3", Digest: map[string]string{"a": "exampledigest"}}},
PredicateType: "https://slsa.dev/provenance/v0.2",
PredicateType: "https://witness.testifysec.com/attestation-collection/v0.1",
Predicate: json.RawMessage(validPredicate),
},
},
Expand Down

0 comments on commit 90f9c28

Please sign in to comment.