ipn: Resolve some resource leaks in test.

Updates tailscale/corp#255.

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
This commit is contained in:
Avery Pennarun
2020-05-21 16:30:20 -04:00
parent ea8f92b312
commit 3ed2124356
3 changed files with 27 additions and 10 deletions
+4
View File
@@ -5,6 +5,7 @@
package ipn
import (
"net/http"
"time"
"tailscale.com/control/controlclient"
@@ -104,6 +105,9 @@ type Options struct {
LegacyConfigPath string
// Notify is called when backend events happen.
Notify func(Notify) `json:"-"`
// HTTPTestClient is an optional HTTP client to pass to controlclient
// (for tests only).
HTTPTestClient *http.Client
}
// Backend is the interface between Tailscale frontends