mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-23 17:51:05 +00:00
tstest/integration/vms: avoid log after test completion
Avoids a panic in the Go testing package if a late log comes in. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
parent
583af7c1a6
commit
a1f1020042
@ -71,6 +71,9 @@ func newHarness(t *testing.T) *Harness {
|
||||
lc := &integration.LogCatcher{}
|
||||
if *verboseLogcatcher {
|
||||
lc.UseLogf(t.Logf)
|
||||
t.Cleanup(func() {
|
||||
lc.UseLogf(nil) // do not log after test is complete
|
||||
})
|
||||
}
|
||||
mux.Handle("/c/", lc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user