Răsfoiți Sursa

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 <[email protected]>
Brad Fitzpatrick 1 an în urmă
părinte
comite
46f3feae96
2 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 1 1
      ssh/tailssh/tailssh_test.go
  2. 2 0
      wgengine/userspace.go

+ 1 - 1
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)
 	}

+ 2 - 0
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)
 		}