derp: fix an unchecked error in a test (#17694)

Found by staticcheck, the test was calling derphttp.NewClient but not checking
its error result before doing other things to it.

Updates #cleanup

Change-Id: I4ade35a7de7c473571f176e747866bc0ab5774db
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
M. J. Fromberger
2025-10-28 14:20:19 -07:00
committed by GitHub
parent edb11e0e60
commit 09a2a1048d

View File

@@ -620,6 +620,9 @@ func TestURLDial(t *testing.T) {
}
netMon := netmon.NewStatic()
c, err := derphttp.NewClient(key.NewNode(), "https://"+hostname+"/", t.Logf, netMon)
if err != nil {
t.Errorf("NewClient: %v", err)
}
defer c.Close()
if err := c.Connect(context.Background()); err != nil {