1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:40:22 -07:00

net: add unit test for empty nsswitch on linux

Add testcase for ane existing but empty /etc/nsswitch.conf on linux.

Signed-off-by: Natanael Copa <ncopa@mirantis.com>
This commit is contained in:
Natanael Copa 2020-10-16 18:18:15 +02:00
parent c735e478e3
commit 119409839d

View File

@ -179,6 +179,15 @@ func TestConfHostLookupOrder(t *testing.T) {
},
hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupFilesDNS}},
},
{
name: "linux_empty_nsswitch.conf",
c: &conf{
goos: "linux",
nss: nssStr(""),
resolv: defaultResolvConf,
},
hostTests: []nssHostTest{{"google.com", "myhostname", hostLookupFilesDNS}},
},
{
name: "files_mdns_dns",
c: &conf{