From 46f3feae96f6f20174565a074974df864b733a01 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 3 May 2024 06:24:48 -0700 Subject: [PATCH] ssh/tailssh: plumb health.Tracker in test In prep for it being required in more places. Updates #11874 Change-Id: Ib743205fc2a6c6ff3d2c4ed3a2b28cac79156539 Signed-off-by: Brad Fitzpatrick --- ssh/tailssh/tailssh_test.go | 2 +- wgengine/userspace.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ssh/tailssh/tailssh_test.go b/ssh/tailssh/tailssh_test.go index b3f9bc43c..d9bae13a7 100644 --- a/ssh/tailssh/tailssh_test.go +++ b/ssh/tailssh/tailssh_test.go @@ -821,7 +821,7 @@ func TestSSHAuthFlow(t *testing.T) { func TestSSH(t *testing.T) { var logf logger.Logf = t.Logf sys := &tsd.System{} - eng, err := wgengine.NewFakeUserspaceEngine(logf, sys.Set) + eng, err := wgengine.NewFakeUserspaceEngine(logf, sys.Set, sys.HealthTracker()) if err != nil { t.Fatal(err) } diff --git a/wgengine/userspace.go b/wgengine/userspace.go index b7fa9d02e..4da7f2b5c 100644 --- a/wgengine/userspace.go +++ b/wgengine/userspace.go @@ -244,6 +244,8 @@ func NewFakeUserspaceEngine(logf logger.Logf, opts ...any) (Engine, error) { conf.SetSubsystem = v case *controlknobs.Knobs: conf.ControlKnobs = v + case *health.Tracker: + conf.HealthTracker = v default: return nil, fmt.Errorf("unknown option type %T", v) }