mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
CI: allow customized DS install test to work with domain levels
Test will use tasks methods instead of custom commands to be able work with domain levels. https://fedorahosted.org/freeipa/ticket/5606 Reviewed-By: Milan Kubik <mkubik@redhat.com>
This commit is contained in:
parent
61e627b4b3
commit
a63ce1fe22
@ -224,7 +224,7 @@ def enable_replication_debugging(host):
|
||||
stdin_text=logging_ldif)
|
||||
|
||||
|
||||
def install_master(host, setup_dns=True, setup_kra=False):
|
||||
def install_master(host, setup_dns=True, setup_kra=False, extra_args=()):
|
||||
host.collect_log(paths.IPASERVER_INSTALL_LOG)
|
||||
host.collect_log(paths.IPACLIENT_INSTALL_LOG)
|
||||
inst = host.domain.realm.replace('.', '-')
|
||||
@ -250,6 +250,8 @@ def install_master(host, setup_dns=True, setup_kra=False):
|
||||
'--auto-reverse'
|
||||
])
|
||||
|
||||
args.extend(extra_args)
|
||||
|
||||
host.run_command(args)
|
||||
enable_replication_debugging(host)
|
||||
setup_sssd_debugging(host)
|
||||
@ -307,7 +309,7 @@ def replica_prepare(master, replica):
|
||||
|
||||
|
||||
def install_replica(master, replica, setup_ca=True, setup_dns=False,
|
||||
setup_kra=False):
|
||||
setup_kra=False, extra_args=()):
|
||||
replica.collect_log(paths.IPAREPLICA_INSTALL_LOG)
|
||||
replica.collect_log(paths.IPAREPLICA_CONNCHECK_LOG)
|
||||
allow_sync_ptr(master)
|
||||
@ -325,6 +327,9 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False,
|
||||
])
|
||||
if master_authoritative_for_client_domain(master, replica):
|
||||
args.extend(['--ip-address', replica.ip])
|
||||
|
||||
args.extend(extra_args)
|
||||
|
||||
if domainlevel(master) == DOMAIN_LEVEL_0:
|
||||
# prepare the replica file on master and put it to replica, AKA "old way"
|
||||
replica_prepare(master, replica)
|
||||
|
@ -59,14 +59,9 @@ class TestCustomInstallMaster(IntegrationTest):
|
||||
cls.master.put_file_contents(CONFIG_LDIF_PATH, DIRSRV_CONFIG_MODS)
|
||||
|
||||
def test_customized_ds_install_master(self):
|
||||
args = [
|
||||
'ipa-server-install', '-U',
|
||||
'-r', self.master.domain.name,
|
||||
'-p', self.master.config.dirman_password,
|
||||
'-a', self.master.config.admin_password,
|
||||
'--dirsrv-config-file', CONFIG_LDIF_PATH,
|
||||
]
|
||||
self.master.run_command(args)
|
||||
tasks.install_master(self.master, setup_dns=False, extra_args=[
|
||||
'--dirsrv-config-file', CONFIG_LDIF_PATH
|
||||
])
|
||||
|
||||
|
||||
class TestCustomInstallReplica(IntegrationTest):
|
||||
@ -83,12 +78,6 @@ class TestCustomInstallReplica(IntegrationTest):
|
||||
tasks.install_master(cls.master)
|
||||
|
||||
def test_customized_ds_install_replica(self):
|
||||
tasks.replica_prepare(self.master, self.replicas[0])
|
||||
replica_filename = tasks.get_replica_filename(self.replicas[0])
|
||||
args = ['ipa-replica-install', '-U',
|
||||
'-p', self.replicas[0].config.dirman_password,
|
||||
'-w', self.replicas[0].config.admin_password,
|
||||
'--ip-address', self.replicas[0].ip,
|
||||
'--dirsrv-config-file', CONFIG_LDIF_PATH,
|
||||
replica_filename]
|
||||
self.replicas[0].run_command(args)
|
||||
tasks.install_replica(
|
||||
self.master, self.replicas[0], setup_ca=False,
|
||||
extra_args=['--dirsrv-config-file', CONFIG_LDIF_PATH])
|
||||
|
Loading…
Reference in New Issue
Block a user