net/dns: work around WSL DNS implementation flaws.

Fixes tailscale/corp#1662

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-26 15:14:41 -07:00
committed by Dave Anderson
parent ffe6c8e335
commit 97d2fa2f56
2 changed files with 29 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
package dns
import (
"runtime"
"testing"
"github.com/google/go-cmp/cmp"
@@ -45,6 +46,10 @@ func (c *fakeOSConfigurator) GetBaseConfig() (OSConfig, error) {
func (c *fakeOSConfigurator) Close() error { return nil }
func TestManager(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skipf("test's assumptions break because of https://github.com/tailscale/corp/issues/1662")
}
// Note: these tests assume that it's safe to switch the
// OSConfigurator's split-dns support on and off between Set
// calls. Empirically this is currently true, because we reprobe