|
|
|
|
@ -113,10 +113,10 @@ func TestContainerBoot(t *testing.T) { |
|
|
|
|
State: ptr.To(ipn.Running), |
|
|
|
|
NetMap: &netmap.NetworkMap{ |
|
|
|
|
SelfNode: (&tailcfg.Node{ |
|
|
|
|
StableID: tailcfg.StableNodeID("myID"), |
|
|
|
|
Name: "test-node.test.ts.net", |
|
|
|
|
StableID: tailcfg.StableNodeID("myID"), |
|
|
|
|
Name: "test-node.test.ts.net", |
|
|
|
|
Addresses: []netip.Prefix{netip.MustParsePrefix("100.64.0.1/32")}, |
|
|
|
|
}).View(), |
|
|
|
|
Addresses: []netip.Prefix{netip.MustParsePrefix("100.64.0.1/32")}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
tests := []struct { |
|
|
|
|
@ -359,6 +359,7 @@ func TestContainerBoot(t *testing.T) { |
|
|
|
|
"authkey": "tskey-key", |
|
|
|
|
"device_fqdn": "test-node.test.ts.net", |
|
|
|
|
"device_id": "myID", |
|
|
|
|
"device_ips": `["100.64.0.1"]`, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
@ -447,6 +448,7 @@ func TestContainerBoot(t *testing.T) { |
|
|
|
|
WantKubeSecret: map[string]string{ |
|
|
|
|
"device_fqdn": "test-node.test.ts.net", |
|
|
|
|
"device_id": "myID", |
|
|
|
|
"device_ips": `["100.64.0.1"]`, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
@ -476,6 +478,7 @@ func TestContainerBoot(t *testing.T) { |
|
|
|
|
"authkey": "tskey-key", |
|
|
|
|
"device_fqdn": "test-node.test.ts.net", |
|
|
|
|
"device_id": "myID", |
|
|
|
|
"device_ips": `["100.64.0.1"]`, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
@ -483,16 +486,17 @@ func TestContainerBoot(t *testing.T) { |
|
|
|
|
State: ptr.To(ipn.Running), |
|
|
|
|
NetMap: &netmap.NetworkMap{ |
|
|
|
|
SelfNode: (&tailcfg.Node{ |
|
|
|
|
StableID: tailcfg.StableNodeID("newID"), |
|
|
|
|
Name: "new-name.test.ts.net", |
|
|
|
|
StableID: tailcfg.StableNodeID("newID"), |
|
|
|
|
Name: "new-name.test.ts.net", |
|
|
|
|
Addresses: []netip.Prefix{netip.MustParsePrefix("100.64.0.1/32")}, |
|
|
|
|
}).View(), |
|
|
|
|
Addresses: []netip.Prefix{netip.MustParsePrefix("100.64.0.1/32")}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
WantKubeSecret: map[string]string{ |
|
|
|
|
"authkey": "tskey-key", |
|
|
|
|
"device_fqdn": "new-name.test.ts.net", |
|
|
|
|
"device_id": "newID", |
|
|
|
|
"device_ips": `["100.64.0.1"]`, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
|