fix: another sharded uuid reference (#143)

* fix: another sharded uuid reference

Signed-off-by: Asra Ali <asraa@google.com>
This commit is contained in:
asraa
2022-07-12 10:21:10 -05:00
committed by GitHub
parent 0acf40489b
commit 84f1f38dbf
4 changed files with 11 additions and 2 deletions
+9 -1
View File
@@ -22,7 +22,7 @@ func pString(s string) *string {
// Versions of the builders to test.
// TODO: Test v0.0.2.
var generatorVersions = []string{"v1.1.1"}
var generatorVersions = []string{"v0.0.2", "v1.1.1"}
func Test_runVerify(t *testing.T) {
t.Parallel()
@@ -326,6 +326,14 @@ func Test_runVerify(t *testing.T) {
err: pkg.ErrorNoValidRekorEntries,
noversion: true,
},
// Regression test of sharded UUID
{
name: "regression: sharded uuids",
artifact: "binary-linux-amd64-sharded",
source: "github.com/slsa-framework/slsa-verifier",
branch: "release/v1.0",
noversion: true,
},
}
for _, tt := range tests {
tt := tt // Re-initializing variable so it is not changed while executing the closure below
+1 -1
View File
@@ -281,7 +281,7 @@ func verifyTlogEntryByUUID(ctx context.Context, rekorClient *client.Rekor, entry
e = entry
}
return verifyTlogEntry(ctx, rekorClient, params.EntryUUID, e)
return verifyTlogEntry(ctx, rekorClient, uuid, e)
}
func verifyTlogEntry(ctx context.Context, rekorClient *client.Rekor, uuid string, e models.LogEntryAnon) (*models.LogEntryAnon, error) {
Binary file not shown.
File diff suppressed because one or more lines are too long