ipn/iplocal: make key_extension_test from cherry-pick use current APIs

key_extension_test came from @apenwarr's "continue map poll" commit
(6a822dc) which was since reverted, and various APIs used by the tests
were altered.  This updates the test so that go vet/go check pass.

Signed-off-by: Luke Kosewski <lkosewsk@tailscale.com>
This commit is contained in:
Luke Kosewski committed 2026-07-01 21:06:10 -07:00
1 parent 12f6e54632
commit f5b4320ad5
1 file changed
+5 -5
+5 -5
View File
@@ -44,7 +44,7 @@ func TestKeyExtensionWakesUpExpiredClient(t *testing.T) {
t.Cleanup(b.Shutdown)
var cc *mockControl
b.SetControlClientGetterForTesting(func(opts controlclient.Options) (controlclient.Client, error) {
b.ForTest().SetControlClientGetter(func(opts controlclient.Options) (controlclient.Client, error) {
cc = newClient(t, opts)
return cc, nil
})
@@ -170,7 +170,7 @@ func TestKeyExpiredStateMachine(t *testing.T) {
t.Cleanup(b.Shutdown)
var cc *mockControl
b.SetControlClientGetterForTesting(func(opts controlclient.Options) (controlclient.Client, error) {
b.ForTest().SetControlClientGetter(func(opts controlclient.Options) (controlclient.Client, error) {
cc = newClient(t, opts)
return cc, nil
})
@@ -247,7 +247,7 @@ func TestKeyExpiryExtendedUnblocksEngine(t *testing.T) {
t.Cleanup(b.Shutdown)
var cc *mockControl
b.SetControlClientGetterForTesting(func(opts controlclient.Options) (controlclient.Client, error) {
b.ForTest().SetControlClientGetter(func(opts controlclient.Options) (controlclient.Client, error) {
cc = newClient(t, opts)
return cc, nil
})
@@ -330,7 +330,7 @@ func TestKeyExpiryZeroMeansNoExpiry(t *testing.T) {
t.Cleanup(b.Shutdown)
var cc *mockControl
b.SetControlClientGetterForTesting(func(opts controlclient.Options) (controlclient.Client, error) {
b.ForTest().SetControlClientGetter(func(opts controlclient.Options) (controlclient.Client, error) {
cc = newClient(t, opts)
return cc, nil
})
@@ -382,7 +382,7 @@ func TestKeyExpiryWithNetMapUpdate(t *testing.T) {
t.Cleanup(b.Shutdown)
var cc *mockControl
b.SetControlClientGetterForTesting(func(opts controlclient.Options) (controlclient.Client, error) {
b.ForTest().SetControlClientGetter(func(opts controlclient.Options) (controlclient.Client, error) {
cc = newClient(t, opts)
return cc, nil
})