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>
main
David Crawshaw 5 years ago committed by David Crawshaw
parent 583af7c1a6
commit a1f1020042
  1. 3
      tstest/integration/vms/harness_test.go

@ -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…
Cancel
Save