From f5b4320ad576e910fbc8663c129c47ff70cfb751 Mon Sep 17 00:00:00 2001 From: Luke Kosewski Date: Wed, 1 Jul 2026 21:06:10 -0700 Subject: [PATCH] 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 --- ipn/ipnlocal/key_extension_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ipn/ipnlocal/key_extension_test.go b/ipn/ipnlocal/key_extension_test.go index 389178751..4f4a91651 100644 --- a/ipn/ipnlocal/key_extension_test.go +++ b/ipn/ipnlocal/key_extension_test.go @@ -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 })