did: last cleanups

This commit is contained in:
Michael Muré
2024-10-24 12:51:21 +02:00
parent 2ffdf004ac
commit 2c58fedfd5
2 changed files with 4 additions and 10 deletions

View File

@@ -25,10 +25,6 @@ func TestMustParseDIDKey(t *testing.T) {
})
}
func TestRoundTrip(t *testing.T) {
// TODO: round-trip pubkey-->did-->pubkey for all supported types
}
func TestEquivalence(t *testing.T) {
undef0 := DID{}
undef1 := Undef

View File

@@ -34,18 +34,16 @@ func TestDidKeyVectors(t *testing.T) {
// This test vector only contains a DID Document
// "x25519.json",
} {
vs := loadTestVectors(t, f)
vectors := loadTestVectors(t, f)
t.Run(f, func(t *testing.T) {
t.Parallel()
for k, v := range vs {
f := f
for k, vector := range vectors {
t.Run(k, func(t *testing.T) {
t.Parallel()
// round-trip pubkey-->did-->pubkey, verified against the test vectors.
exp := vectorPubKey(t, v)
exp := vectorPubKey(t, vector)
id, err := did.FromPubKey(exp)
require.NoError(t, err, f, k)