From dbea8217ac10e78cf8500a14769731e503da827b Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Thu, 10 Feb 2022 13:41:04 -0800 Subject: [PATCH] net/dns: add NetworkManager regression test Use the exact /etc/resolv.conf file from a user report. Updates https://github.com/tailscale/tailscale/issues/3531 Signed-off-by: Denton Gentry --- net/dns/manager_linux_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/net/dns/manager_linux_test.go b/net/dns/manager_linux_test.go index 1bbd97592..ed8c60e2b 100644 --- a/net/dns/manager_linux_test.go +++ b/net/dns/manager_linux_test.go @@ -220,6 +220,17 @@ func TestLinuxDNSMode(t *testing.T) { wantLog: "dns: [rc=nm nm-resolved=yes nm=no ret=systemd-resolved]", want: "systemd-resolved", }, + { + // regression test for https://github.com/tailscale/tailscale/issues/3531 + name: "networkmanager_but_systemd-resolved_with_search_domain", + env: env(resolvDotConf( + "# Generated by NetworkManager", + "search lan", + "nameserver 127.0.0.53"), + resolvedRunning()), + wantLog: "dns: [rc=nm nm-resolved=yes nm=no ret=systemd-resolved]", + want: "systemd-resolved", + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {