did: last cleanups
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user