freeipa/ipatests/test_ipapython
Stanislav Levin 2996cc8eae tests: Configure DNSResolver as platform agnostic resolver
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>
2023-02-01 17:49:43 +01:00
..
__init__.py Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test_certdb.py ipatests: Update NSSDatabase DBM test on non-DBM-capable installs 2021-01-29 18:06:15 +01:00
test_cookie.py handle Y2038 in timestamp to datetime conversions 2020-06-25 09:18:02 +03:00
test_directivesetter.py Add option to remove lines from a file 2019-04-02 19:35:38 +02:00
test_dn.py pylint: Fix useless-suppression 2022-03-11 13:37:08 -05:00
test_dnsutil.py tests: Configure DNSResolver as platform agnostic resolver 2023-02-01 17:49:43 +01:00
test_ipautil.py Add helper for poll/sleep loops with timeout 2020-09-30 09:52:08 +02:00
test_ipavalidate.py pytest: Migrate unittest/nose to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_kerberos.py Sprinkle raw strings across the code base 2018-09-27 10:23:03 +02:00
test_keyring.py ipatests: Skip keyring tests on containerized platforms 2020-08-07 17:49:31 +03:00
test_ldap_cache.py Return a copy of cached entries, only with requested attributes 2021-06-29 14:55:50 +03:00
test_session_storage.py pytest: Migrate xunit-style setups to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_ssh.py ipatests: add test for multiple permitopen entries in SSH keys 2021-03-29 10:06:07 +03:00