all: replace tailcfg.DiscoKey with key.DiscoPublic.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-11-02 14:41:56 -07:00
committed by Brad Fitzpatrick
parent f771327f0c
commit 0532eb30db
16 changed files with 51 additions and 95 deletions

View File

@@ -407,14 +407,6 @@ func TestNetInfoFields(t *testing.T) {
}
}
func TestDiscoKeyMarshal(t *testing.T) {
var k1, k2 DiscoKey
for i := range k1 {
k1[i] = byte(i)
}
testKey(t, "discokey:", k1, &k2)
}
type keyIn interface {
String() string
MarshalText() ([]byte, error)
@@ -542,15 +534,6 @@ func TestAppendKeyAllocs(t *testing.T) {
}
}
func TestDiscoKeyAppend(t *testing.T) {
d := DiscoKey{1: 1, 2: 2}
got := string(d.AppendTo([]byte("foo")))
want := "foodiscokey:0001020000000000000000000000000000000000000000000000000000000000"
if got != want {
t.Errorf("got %q; want %q", got, want)
}
}
func TestRegisterRequestNilClone(t *testing.T) {
var nilReq *RegisterRequest
got := nilReq.Clone()