(t *testing.T)
| 232 | } |
| 233 | |
| 234 | func TestMatchUnreleasedSignatures(t *testing.T) { |
| 235 | // try an "unreleased" target with 3 signatures, 0 rows will appear |
| 236 | unreleasedTgts := []notaryclient.TargetSignedStruct{} |
| 237 | |
| 238 | tgt := notaryclient.Target{Name: "unreleased", Hashes: data.Hashes{notary.SHA256: []byte("hash")}} |
| 239 | for _, unreleasedRole := range []string{"targets/a", "targets/b", "targets/c"} { |
| 240 | unreleasedTgts = append(unreleasedTgts, notaryclient.TargetSignedStruct{Role: mockDelegationRoleWithName(unreleasedRole), Target: tgt}) |
| 241 | } |
| 242 | |
| 243 | matchedSigRows := matchReleasedSignatures(unreleasedTgts) |
| 244 | assert.Check(t, is.Len(matchedSigRows, 0)) |
| 245 | } |
| 246 | |
| 247 | func TestMatchOneReleasedSingleSignature(t *testing.T) { |
| 248 | // now try only 1 "released" target with no additional sigs, 1 row will appear with 0 signers |
nothing calls this directly
no test coverage detected
searching dependent graphs…