From bd33eb7bd7636199c3acecbc40a23033240de6f7 Mon Sep 17 00:00:00 2001 From: Nick Khyl Date: Wed, 23 Apr 2025 09:57:59 -0500 Subject: [PATCH] ipn/ipnlocal: use tsd.NewSystem instead of &tsd.System in a few more tests These were likely added after everything else was updated to use tsd.NewSystem, in a feature branch, and before it was merged back into main. Updates #15160 Signed-off-by: Nick Khyl --- ipn/ipnlocal/extension_host_test.go | 4 ++-- ipn/ipnlocal/state_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ipn/ipnlocal/extension_host_test.go b/ipn/ipnlocal/extension_host_test.go index ced5867e7..4c497dd99 100644 --- a/ipn/ipnlocal/extension_host_test.go +++ b/ipn/ipnlocal/extension_host_test.go @@ -284,7 +284,7 @@ func TestNewExtensionHost(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() logf := tstest.WhileTestRunningLogger(t) - h, err := NewExtensionHost(logf, &tsd.System{}, &testBackend{}, tt.defs...) + h, err := NewExtensionHost(logf, tsd.NewSystem(), &testBackend{}, tt.defs...) if gotErr := err != nil; gotErr != tt.wantErr { t.Errorf("NewExtensionHost: gotErr %v(%v); wantErr %v", gotErr, err, tt.wantErr) } @@ -1118,7 +1118,7 @@ func newExtensionHostForTest[T ipnext.Extension](t *testing.T, b Backend, initia } defs[i] = ipnext.DefinitionForTest(ext) } - h, err := NewExtensionHost(logf, &tsd.System{}, b, defs...) + h, err := NewExtensionHost(logf, tsd.NewSystem(), b, defs...) if err != nil { t.Fatalf("NewExtensionHost: %v", err) } diff --git a/ipn/ipnlocal/state_test.go b/ipn/ipnlocal/state_test.go index a91ec84cb..5d9e8b169 100644 --- a/ipn/ipnlocal/state_test.go +++ b/ipn/ipnlocal/state_test.go @@ -1397,7 +1397,7 @@ func newLocalBackendWithMockEngineAndControl(t *testing.T, enableLogging bool) ( dialer := &tsdial.Dialer{Logf: logf} dialer.SetNetMon(netmon.NewStatic()) - sys := &tsd.System{} + sys := tsd.NewSystem() sys.Set(dialer) sys.Set(dialer.NetMon())