Skip to content

Commit

Permalink
test: clarify DB tests for TAP-12
Browse files Browse the repository at this point in the history
  • Loading branch information
znewman01 committed Jun 13, 2022
1 parent f0163be commit 8d8152f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions verify/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestDelegationsDB(t *testing.T) {
initErr: ErrInvalidThreshold,
},
{
testName: "standard key IDs supported",
testName: "standard (SHA256) key IDs supported",
delegations: &data.Delegations{
Keys: map[string]*data.PublicKey{
key.PublicData().IDs()[0]: key.PublicData(),
Expand All @@ -49,10 +49,13 @@ func TestDelegationsDB(t *testing.T) {
},
},
},
// If we get to ErrNoSignatures, we've passed key loading; see
// delegations_test.go to see tests that delegation DB *fully* works
// with valid signatures set up.
unmarshalErr: ErrNoSignatures,
},
{
testName: "arbitrary key IDs supported",
testName: "arbitrary (non-SHA256, per TAP-12) key IDs supported",
delegations: &data.Delegations{
Keys: map[string]*data.PublicKey{
"a": key.PublicData(),
Expand All @@ -64,6 +67,9 @@ func TestDelegationsDB(t *testing.T) {
},
},
},
// If we get to ErrNoSignatures, we've passed key loading; see
// delegations_test.go to see tests that delegation DB *fully* works
// with valid signatures set up.
unmarshalErr: ErrNoSignatures,
},
}
Expand Down

0 comments on commit 8d8152f

Please sign in to comment.