chore: publish IntegraCI build modules dafcf6d0e87d
This commit is contained in:
1 parent
395617ae63
commit
e6bc5d215e
6 files changed
+60
-14
No files matched your search
@@ -200,3 +200,17 @@ func TestRekorURLRefusesUnsafeValues(t *testing.T) {
|
||||
t.Fatalf("a plain https URL must pass: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnpublishedSignatureNotice(t *testing.T) {
|
||||
for _, m := range []string{"gpg", "in-toto"} {
|
||||
n := UnpublishedSignatureNotice(m)
|
||||
if !strings.Contains(n, "NOT published") || !strings.Contains(n, m) {
|
||||
t.Fatalf("%s: notice must say the signature is not published and name the method, got %q", m, n)
|
||||
}
|
||||
}
|
||||
for _, m := range []string{"cosign", "notation", "none", ""} {
|
||||
if n := UnpublishedSignatureNotice(m); n != "" {
|
||||
t.Fatalf("%s publishes a signature (or claims none); want no notice, got %q", m, n)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user