From 526b85a66e9ab90a5c4ef3f9ecca200664e1af9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= Date: Tue, 30 Jul 2019 16:30:41 +0200 Subject: [PATCH] ipatests: rename config_replica_resolvconf_with_master_data() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit config_replica_resolvconf_with_master_data() is not replica specific. Rename to config_host_resolvconf_with_master_data() as it is not tied to any role (master, replica, client). Signed-off-by: François Cami Reviewed-By: Sergey Orlov Reviewed-By: Rob Crittenden --- ipatests/pytest_ipa/integration/tasks.py | 6 +++--- ipatests/test_integration/test_backup_and_restore.py | 12 ++++++------ ipatests/test_integration/test_nfs.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index 99f6d3df5..2626aecdf 100644 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -414,13 +414,13 @@ def master_authoritative_for_client_domain(master, client): return result.returncode == 0 -def config_replica_resolvconf_with_master_data(master, replica): +def config_host_resolvconf_with_master_data(master, host): """ - Configure replica /etc/resolv.conf to use master as DNS server + Configure host /etc/resolv.conf to use master as DNS server """ content = ('search {domain}\nnameserver {master_ip}' .format(domain=master.domain.name, master_ip=master.ip)) - replica.put_file_contents(paths.RESOLV_CONF, content) + host.put_file_contents(paths.RESOLV_CONF, content) def install_replica(master, replica, setup_ca=True, setup_dns=False, diff --git a/ipatests/test_integration/test_backup_and_restore.py b/ipatests/test_integration/test_backup_and_restore.py index 1a9fda102..a0dbe8155 100644 --- a/ipatests/test_integration/test_backup_and_restore.py +++ b/ipatests/test_integration/test_backup_and_restore.py @@ -495,12 +495,12 @@ class TestBackupAndRestoreWithReplica(IntegrationTest): # Configure /etc/resolv.conf on each replica to use the master as DNS # Otherwise ipa-replica-manage re-initialize is unable to # resolve the master name - tasks.config_replica_resolvconf_with_master_data( - cls.master, - cls.replica1) - tasks.config_replica_resolvconf_with_master_data( - cls.master, - cls.replica2) + tasks.config_host_resolvconf_with_master_data( + cls.master, cls.replica1 + ) + tasks.config_host_resolvconf_with_master_data( + cls.master, cls.replica2 + ) # Configure only master and one replica. # Replica is configured without CA tasks.install_topo( diff --git a/ipatests/test_integration/test_nfs.py b/ipatests/test_integration/test_nfs.py index 67eb5574a..13c152c06 100644 --- a/ipatests/test_integration/test_nfs.py +++ b/ipatests/test_integration/test_nfs.py @@ -42,7 +42,7 @@ class TestNFS(IntegrationTest): clients = (cls.clients[0], cls.replicas[0], cls.replicas[1]) for client in clients: tasks.backup_file(client, paths.RESOLV_CONF) - tasks.config_replica_resolvconf_with_master_data( + tasks.config_host_resolvconf_with_master_data( cls.master, client ) tasks.install_client(cls.master, client)