types/persist: use new node key type.

Updates #3206

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-10-28 09:50:58 -07:00
parent 5302e4be96
commit 0c546a28ba
8 changed files with 24 additions and 41 deletions

View File

@@ -15,12 +15,13 @@ import (
"testing"
"time"
"go4.org/mem"
"inet.af/netaddr"
"tailscale.com/tailcfg"
"tailscale.com/tstest"
"tailscale.com/types/key"
"tailscale.com/types/persist"
"tailscale.com/types/preftype"
"tailscale.com/types/wgkey"
)
func fieldsOf(t reflect.Type) (fields []string) {
@@ -404,7 +405,7 @@ func TestPrefsPretty(t *testing.T) {
{
Prefs{
Persist: &persist.Persist{
PrivateNodeKey: wgkey.Private{1: 1},
PrivateNodeKey: key.NodePrivateFromRaw32(mem.B([]byte{1: 1, 31: 0})),
},
},
"linux",