wgengine/magicsock: fix CI-only test warning of missing health tracker

While looking at deflaking TestTwoDevicePing/ping_1.0.0.2_via_SendPacket,
there were a bunch of distracting:

    WARNING: (non-fatal) nil health.Tracker (being strict in CI): ...

This pacifies those so it's easier to work on actually deflaking the test.

Updates #11762
Updates #11874

Change-Id: I08dcb44511d4996b68d5f1ce5a2619b555a2a773
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/13403/merge
Brad Fitzpatrick 1 week ago committed by Brad Fitzpatrick
parent 74dd24ce71
commit 6a885dbc36

@ -176,6 +176,7 @@ func newMagicStackWithKey(t testing.TB, logf logger.Logf, l nettype.PacketListen
if err != nil { if err != nil {
t.Fatalf("netmon.New: %v", err) t.Fatalf("netmon.New: %v", err)
} }
ht := new(health.Tracker)
var reg usermetric.Registry var reg usermetric.Registry
epCh := make(chan []tailcfg.Endpoint, 100) // arbitrary epCh := make(chan []tailcfg.Endpoint, 100) // arbitrary
@ -183,6 +184,7 @@ func newMagicStackWithKey(t testing.TB, logf logger.Logf, l nettype.PacketListen
NetMon: netMon, NetMon: netMon,
Metrics: &reg, Metrics: &reg,
Logf: logf, Logf: logf,
HealthTracker: ht,
DisablePortMapper: true, DisablePortMapper: true,
TestOnlyPacketListener: l, TestOnlyPacketListener: l,
EndpointsFunc: func(eps []tailcfg.Endpoint) { EndpointsFunc: func(eps []tailcfg.Endpoint) {

Loading…
Cancel
Save