From 2c58fedfd528925a42cdbf188e87fb5dbe03aed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Thu, 24 Oct 2024 12:51:21 +0200 Subject: [PATCH] did: last cleanups --- did/did_test.go | 4 ---- did/key_spec_test.go | 10 ++++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/did/did_test.go b/did/did_test.go index f536c32..47585af 100644 --- a/did/did_test.go +++ b/did/did_test.go @@ -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 diff --git a/did/key_spec_test.go b/did/key_spec_test.go index 7d4e4b2..51b8f76 100644 --- a/did/key_spec_test.go +++ b/did/key_spec_test.go @@ -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)