summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-02-24 17:45:55 +0100
committerMartin Basti <mbasti@redhat.com>2016-03-03 17:26:56 +0100
commita63ce1fe22fe16f7cf6ec569498c5aea8aa239b1 (patch)
treef0bf60ae2c52c82c8b69bfa85c9c45f93ef45d29
parent61e627b4b3b9a9547128f128410d24b3cbe81b13 (diff)
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>
-rw-r--r--ipatests/test_integration/tasks.py9
-rw-r--r--ipatests/test_integration/test_customized_ds_config_install.py23
2 files changed, 13 insertions, 19 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index ad2eab218..cb9620133 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -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)
diff --git a/ipatests/test_integration/test_customized_ds_config_install.py b/ipatests/test_integration/test_customized_ds_config_install.py
index 0d8c836d9..b0ee8f73e 100644
--- a/ipatests/test_integration/test_customized_ds_config_install.py
+++ b/ipatests/test_integration/test_customized_ds_config_install.py
@@ -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])