mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
python:tests: Tell dns.resolver to not read /etc/resolv.conf
We explicitly set the nameserver in the next line. Also the file /etc/resolv.conf might not exist on the system (e.g in Fedora mockbuild). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15308 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
804fb07259
commit
c4dba61e36
@ -30,7 +30,9 @@ class NetAdsDnsTests(BlackboxTestCase):
|
||||
def setUp(self):
|
||||
super(NetAdsDnsTests, self).setUp()
|
||||
nameserver = os.environ["DC_SERVER_IP"]
|
||||
self.resolver = dns.resolver.Resolver()
|
||||
# filename=None will disable reading /etc/resolv.conf. The file might
|
||||
# not exist e.g. on build or CI systems.
|
||||
self.resolver = dns.resolver.Resolver(filename=None)
|
||||
self.resolver.nameservers = [nameserver]
|
||||
|
||||
def parse_output(self, output):
|
||||
|
Loading…
Reference in New Issue
Block a user