mirror of
https://github.com/tailscale/tailscale.git
synced 2025-09-21 13:41:46 +02:00
ipn/ipnlocal: add state change test for key expiry
Updates tailscale/corp#31478 Signed-off-by: James Sanderson <jsanderson@tailscale.com>
This commit is contained in:
parent
46369f06af
commit
046b8830c7
@ -1349,6 +1349,21 @@ func TestEngineReconfigOnStateChange(t *testing.T) {
|
|||||||
Hosts: hostsFor(node3),
|
Hosts: hostsFor(node3),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Start/Connect/Login/Expire",
|
||||||
|
steps: func(t *testing.T, lb *LocalBackend, cc func() *mockControl) {
|
||||||
|
mustDo(t)(lb.Start(ipn.Options{}))
|
||||||
|
mustDo2(t)(lb.EditPrefs(connect))
|
||||||
|
cc().authenticated(node3)
|
||||||
|
cc().send(nil, "", false, &netmap.NetworkMap{
|
||||||
|
Expiry: time.Now().Add(-time.Minute),
|
||||||
|
})
|
||||||
|
},
|
||||||
|
wantState: ipn.NeedsLogin,
|
||||||
|
wantCfg: &wgcfg.Config{},
|
||||||
|
wantRouterCfg: &router.Config{},
|
||||||
|
wantDNSCfg: &dns.Config{},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user