mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: rename config_replica_resolvconf_with_master_data()
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 <fcami@redhat.com> Reviewed-By: Sergey Orlov <sorlov@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
21cd9775ec
commit
526b85a66e
@ -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,
|
||||
|
@ -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(
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user