From bab2d92c421e3a7545c5e67def25d867646bd3e3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 28 Oct 2021 10:39:56 -0700 Subject: [PATCH] tailcfg: remove use of wgkey. Signed-off-by: David Anderson --- tailcfg/tailcfg_test.go | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tailcfg/tailcfg_test.go b/tailcfg/tailcfg_test.go index b094b71e1..9a1f4bdb1 100644 --- a/tailcfg/tailcfg_test.go +++ b/tailcfg/tailcfg_test.go @@ -14,7 +14,6 @@ "inet.af/netaddr" "tailscale.com/types/key" - "tailscale.com/types/wgkey" "tailscale.com/version" ) @@ -205,15 +204,7 @@ func TestNodeEqual(t *testing.T) { have, nodeHandles) } - newPublicKey := func(t *testing.T) wgkey.Key { - t.Helper() - k, err := wgkey.NewPrivate() - if err != nil { - t.Fatal(err) - } - return k.Public() - } - n1 := newPublicKey(t) + n1 := key.NewNode().Public() m1 := key.NewMachine().Public() now := time.Now() @@ -272,13 +263,13 @@ func TestNodeEqual(t *testing.T) { true, }, { - &Node{Key: NodeKey(n1)}, - &Node{Key: NodeKey(newPublicKey(t))}, + &Node{Key: NodeKeyFromNodePublic(n1)}, + &Node{Key: NodeKeyFromNodePublic(key.NewNode().Public())}, false, }, { - &Node{Key: NodeKey(n1)}, - &Node{Key: NodeKey(n1)}, + &Node{Key: NodeKeyFromNodePublic(n1)}, + &Node{Key: NodeKeyFromNodePublic(n1)}, true, }, {