freeipa/ipatests
Sergey Orlov 2e92d0836d
ipatests: add utility for managing domain name resolvers
Many test scenarios need to configure resolvers on test machines. Most
notable patterns are:

* using IPA master as DNS resolver on clients and replicas
* intentionally breaking name resolution

Now it is done by directly editing /etc/resolv.conf file. While being
simple this approach has following issues:

* NetworkManager restores this file periodically and on specific events
* This is not how users are expected to manage resolvers on modern
  systems with NetworkManager and systemd-resolved.

This patch introduces three classes for main types of resolvers management:
* plain file
* NetworkManager
* systemd-resolved

For each resolver manager the native way of configuring of nameserves is
used: direct editing for /etc/resolv.conf or drop-in config files for
NM and resolved.

The type of resolver is automatically detected for each host and an
appropriate instance is added to Host object.

The Resolver class (and it's subclasses) provide convenience functions
for changing nameservers and restoring the original config.
During all operations (backup, modify, restore) it checks that resolver
configuration has not been altered unexpectedly and raises exception if it
was. This helps to detect unexpected changes in resolvers.

Related to https://pagure.io/freeipa/issue/8703

Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2021-03-04 18:47:32 +01:00
..
azure Azure: Populate containers with self-AAAA records 2021-02-15 09:54:51 +02:00
man Simplify ipa-run-tests script 2019-07-16 13:23:21 +03:00
prci_definitions ipatests: update nightly definition for ipa_cert_fix suite 2021-02-23 13:25:26 +01:00
pytest_ipa ipatests: add utility for managing domain name resolvers 2021-03-04 18:47:32 +01:00
test_cmdline Make tab completion in console more useful 2020-07-07 12:36:10 +02:00
test_install Unify access to FQDN 2020-10-26 17:11:19 +11:00
test_integration ipatests: add utility for managing domain name resolvers 2021-03-04 18:47:32 +01:00
test_ipaclient Remove support for csrgen 2021-01-21 13:51:45 +01:00
test_ipalib ipatests: test that trailing/leading whitespaces in passwords are allowed 2020-12-18 16:47:59 +02:00
test_ipaplatform Add missing fedora_container platform members 2020-09-29 12:06:24 +02:00
test_ipapython ipatests: Update NSSDatabase DBM test on non-DBM-capable installs 2021-01-29 18:06:15 +01:00
test_ipaserver test_installutils: run gpg-agent under a specific SELinux context 2021-02-11 09:09:46 +01:00
test_ipatests_plugins ipatests: Don't turn Pytest IPA deprecation warnings into errors 2020-07-29 15:10:00 -04:00
test_webui test_webui: test_hostgroup: Wait for modal dialog to appear 2021-02-04 13:23:19 +01:00
test_xmlrpc xmlrpc tests: add a test for cert-remove-hold 2021-02-12 17:49:02 +01:00
__init__.py Make an ipa-tests package 2013-06-17 19:22:50 +02:00
conftest.py ipatests: Don't turn Pytest IPA deprecation warnings into errors 2020-07-29 15:10:00 -04:00
create_external_ca.py Test external CA with DNS name constraints 2019-08-06 12:39:46 +02:00
data.py Fix more bytes/unicode issues 2015-10-22 18:34:46 +02:00
i18n.py Sprinkle raw strings across the code base 2018-09-27 10:23:03 +02:00
ipa-run-tests ipatests: Specify shell implementation 2020-04-21 13:24:50 +02:00
ipa-test-config Rename pytest_plugins to ipatests.pytest_ipa 2018-08-02 17:07:43 +02:00
ipa-test-task ipatests: when talking to AD DCs, use FQDN credentials 2021-01-26 13:05:27 -05:00
Makefile.am Build: fix distribution of static files for web UI 2016-11-09 13:08:32 +01:00
setup.cfg Port all setup.py to setuptools 2016-10-20 18:43:37 +02:00
setup.py ipatests: add a tests-oriented wrapper for pexpect module 2021-02-03 09:06:12 +02:00
test_util.py Fix E712 comparison to True / False 2020-05-05 10:42:46 +02:00
util.py ipatests: Remove no longer needed 'skip' compatibility 2020-04-21 13:24:50 +02:00