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

Commit

Permalink
Add a test for AmberProvenanceMetadataVerifier
Browse files Browse the repository at this point in the history
  • Loading branch information
rbehjati committed Apr 14, 2022
1 parent b4a790c commit 6ff98e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion verify/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

const schemaExamplePath = "schema/amber-slsa-buildtype/v1/example.json"

func TestVerifyProvenanceFile(t *testing.T) {
func TestReproducibleProvenanceVerifier(t *testing.T) {
// In the case of running tests bazel exposes data dependencies not in the
// current dir, but in the parent. Hence we need to move one level up.
os.Chdir("../")
Expand All @@ -32,3 +32,11 @@ func TestVerifyProvenanceFile(t *testing.T) {
t.Fatalf("couldn't verify the provenance file: %v", err)
}
}

func TestAmberProvenanceMetadataVerifier(t *testing.T) {
verifier := AmberProvenanceMetadataVerifier{}

if err := verifier.Verify(schemaExamplePath); err != nil {
t.Fatalf("couldn't verify the provenance file: %v", err)
}
}

0 comments on commit 6ff98e8

Please sign in to comment.