mirror of
https://github.com/tailscale/tailscale.git
synced 2026-07-20 21:23:07 +08:00
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:
parent
12f6e54632
commit
f5b4320ad5
@ -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
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user