mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 13:18:53 +00:00
tsnet: use test logger for testcontrol and node logs
Updates #cleanup Signed-off-by: James Sanderson <jsanderson@tailscale.com>
This commit is contained in:

committed by
James 'zofrex' Sanderson

parent
005e20a45e
commit
5668de272c
@@ -120,6 +120,7 @@ func startControl(t *testing.T) (controlURL string, control *testcontrol.Server)
|
|||||||
Proxied: true,
|
Proxied: true,
|
||||||
},
|
},
|
||||||
MagicDNSDomain: "tail-scale.ts.net",
|
MagicDNSDomain: "tail-scale.ts.net",
|
||||||
|
Logf: t.Logf,
|
||||||
}
|
}
|
||||||
control.HTTPTestServer = httptest.NewUnstartedServer(control)
|
control.HTTPTestServer = httptest.NewUnstartedServer(control)
|
||||||
control.HTTPTestServer.Start()
|
control.HTTPTestServer.Start()
|
||||||
@@ -221,7 +222,7 @@ func startServer(t *testing.T, ctx context.Context, controlURL, hostname string)
|
|||||||
getCertForTesting: testCertRoot.getCert,
|
getCertForTesting: testCertRoot.getCert,
|
||||||
}
|
}
|
||||||
if *verboseNodes {
|
if *verboseNodes {
|
||||||
s.Logf = log.Printf
|
s.Logf = t.Logf
|
||||||
}
|
}
|
||||||
t.Cleanup(func() { s.Close() })
|
t.Cleanup(func() { s.Close() })
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user