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 <bradfitz@tailscale.com>
pull/11995/head
Brad Fitzpatrick 7 months ago committed by Brad Fitzpatrick
parent 4fa6cbec27
commit 46f3feae96

@ -821,7 +821,7 @@ func TestSSHAuthFlow(t *testing.T) {
func TestSSH(t *testing.T) { func TestSSH(t *testing.T) {
var logf logger.Logf = t.Logf var logf logger.Logf = t.Logf
sys := &tsd.System{} sys := &tsd.System{}
eng, err := wgengine.NewFakeUserspaceEngine(logf, sys.Set) eng, err := wgengine.NewFakeUserspaceEngine(logf, sys.Set, sys.HealthTracker())
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

@ -244,6 +244,8 @@ func NewFakeUserspaceEngine(logf logger.Logf, opts ...any) (Engine, error) {
conf.SetSubsystem = v conf.SetSubsystem = v
case *controlknobs.Knobs: case *controlknobs.Knobs:
conf.ControlKnobs = v conf.ControlKnobs = v
case *health.Tracker:
conf.HealthTracker = v
default: default:
return nil, fmt.Errorf("unknown option type %T", v) return nil, fmt.Errorf("unknown option type %T", v)
} }

Loading…
Cancel
Save