tailcfg: use key.NodePublic in wire protocol types.

Updates #3206.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-11-01 20:55:52 -07:00
committed by Dave Anderson
parent 7e8d5ed6f3
commit 7e6a1ef4f1
14 changed files with 56 additions and 57 deletions

View File

@@ -43,12 +43,12 @@ func TestNetworkMapConcise(t *testing.T) {
NodeKey: testNodeKey(1),
Peers: []*tailcfg.Node{
{
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
{
Key: testNodeKey(3).AsNodeKey(),
Key: testNodeKey(3),
DERP: "127.3.3.40:4",
Endpoints: []string{"10.2.0.100:12", "10.1.0.100:12345"},
},
@@ -98,7 +98,7 @@ func TestConciseDiffFrom(t *testing.T) {
NodeKey: testNodeKey(1),
Peers: []*tailcfg.Node{
{
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -108,7 +108,7 @@ func TestConciseDiffFrom(t *testing.T) {
NodeKey: testNodeKey(1),
Peers: []*tailcfg.Node{
{
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -122,7 +122,7 @@ func TestConciseDiffFrom(t *testing.T) {
NodeKey: testNodeKey(1),
Peers: []*tailcfg.Node{
{
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -132,7 +132,7 @@ func TestConciseDiffFrom(t *testing.T) {
NodeKey: testNodeKey(2),
Peers: []*tailcfg.Node{
{
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -147,7 +147,7 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -158,19 +158,19 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 1,
Key: testNodeKey(1).AsNodeKey(),
Key: testNodeKey(1),
DERP: "127.3.3.40:1",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
{
ID: 3,
Key: testNodeKey(3).AsNodeKey(),
Key: testNodeKey(3),
DERP: "127.3.3.40:3",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -185,19 +185,19 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 1,
Key: testNodeKey(1).AsNodeKey(),
Key: testNodeKey(1),
DERP: "127.3.3.40:1",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
{
ID: 3,
Key: testNodeKey(3).AsNodeKey(),
Key: testNodeKey(3),
DERP: "127.3.3.40:3",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -208,7 +208,7 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "192.168.0.100:12354"},
},
@@ -223,7 +223,7 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "1.1.1.1:1"},
},
@@ -234,7 +234,7 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:12", "1.1.1.1:2"},
},
@@ -249,7 +249,7 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:41641", "1.1.1.1:41641"},
DiscoKey: testDiscoKey("f00f00f00f"),
@@ -262,7 +262,7 @@ func TestConciseDiffFrom(t *testing.T) {
Peers: []*tailcfg.Node{
{
ID: 2,
Key: testNodeKey(2).AsNodeKey(),
Key: testNodeKey(2),
DERP: "127.3.3.40:2",
Endpoints: []string{"192.168.0.100:41641", "1.1.1.1:41641"},
DiscoKey: testDiscoKey("ba4ba4ba4b"),