ipn: move e2e_test back to corp repo.

It depends on corp things, so can't run here anyway.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2020-05-27 19:23:17 +00:00
parent 557b310e67
commit 2b74236567
2 changed files with 17 additions and 309 deletions

View File

@@ -1026,3 +1026,20 @@ func (b *LocalBackend) setNetInfo(ni *tailcfg.NetInfo) {
}
c.SetNetInfo(ni)
}
// TestOnlyPublicKeys returns the current machine and node public
// keys. Used in tests only to facilitate automated node authorization
// in the test harness.
func (b *LocalBackend) TestOnlyPublicKeys() (machineKey tailcfg.MachineKey, nodeKey tailcfg.NodeKey) {
b.mu.Lock()
prefs := b.prefs
b.mu.Unlock()
if prefs == nil {
return
}
mk := prefs.Persist.PrivateMachineKey.Public()
nk := prefs.Persist.PrivateNodeKey.Public()
return tailcfg.MachineKey(mk), tailcfg.NodeKey(nk)
}