mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Avoid reading platform specific `/etc/resolv.conf` in `TestDNSResolver` unit tests. Systems (e.g. sandboxes) may not have `/etc/resolv.conf` or this file may not contain any configured name servers. `TestDNSResolver` unit tests check only customized `nameservers` property and should not depend on existence of `/etc/resolv.conf`. Resolver accepts `configure` option. https://dnspython.readthedocs.io/en/latest/resolver-class.html : > configure, a bool. If True (the default), the resolver instance is configured in the normal fashion for the operating system the resolver is running on. (I.e. by reading a /etc/resolv.conf file on POSIX systems and from the registry on Windows systems.) Fixes: https://pagure.io/freeipa/issue/9319 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>