controlclient, ipn: update tests for key pointer change

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
David Crawshaw
2020-02-11 04:52:50 -05:00
committed by David Crawshaw
parent 2f9cdd0aac
commit 33dfb8999e
3 changed files with 6 additions and 6 deletions

View File

@ -641,7 +641,7 @@ func TestRefresh(t *testing.T) {
if got := *exp; !nkey1Expiry.Equal(got) {
t.Errorf("node key expiry = %v, want %v", got, nkey1Expiry)
}
k := tailcfg.NodeKey(*c1.direct.persist.PrivateNodeKey.Public())
k := tailcfg.NodeKey(c1.direct.persist.PrivateNodeKey.Public())
if k != nkey1 {
t.Errorf("node key after 2 hours is %v, want %v", k, nkey1)
}
@ -1077,7 +1077,7 @@ func (c *client) status(t *testing.T) (status statusChange) {
} else {
t.Logf("%s state: %s", c.name, status.New.state)
if status.New.NetMap != nil {
c.mkey = tailcfg.MachineKey(*status.New.Persist.PrivateMachineKey.Public())
c.mkey = tailcfg.MachineKey(status.New.Persist.PrivateMachineKey.Public())
if nkey := status.New.NetMap.NodeKey; nkey != (tailcfg.NodeKey{}) && nkey != c.nkey {
c.nkey = nkey
c.id = c.s.control.DB().Node(c.nkey).ID