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) { func TestEquivalence(t *testing.T) {
undef0 := DID{} undef0 := DID{}
undef1 := Undef undef1 := Undef

View File

@@ -34,18 +34,16 @@ func TestDidKeyVectors(t *testing.T) {
// This test vector only contains a DID Document // This test vector only contains a DID Document
// "x25519.json", // "x25519.json",
} { } {
vs := loadTestVectors(t, f) vectors := loadTestVectors(t, f)
t.Run(f, func(t *testing.T) { t.Run(f, func(t *testing.T) {
t.Parallel() t.Parallel()
for k, v := range vs { for k, vector := range vectors {
f := f
t.Run(k, func(t *testing.T) { 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) id, err := did.FromPubKey(exp)
require.NoError(t, err, f, k) require.NoError(t, err, f, k)