Patch attached. Should fix test_installation for domain level 0
From d1a3796189cf2c34f0d4bdfcb1459dd436194170 Mon Sep 17 00:00:00 2001 From: Martin Basti <mba...@redhat.com> Date: Fri, 15 Jan 2016 18:17:10 +0100 Subject: [PATCH] Tests: Do not set ip address for replica prepare without IPA DNS
ipa-replica-prepare cannot be used with option --ip-address when IPA DNS is not installed --- ipatests/test_integration/tasks.py | 18 +++++++++++------- ipatests/test_integration/test_installation.py | 3 ++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index a1d6cb88a1bfe2ac8c2fae9d758da726a5536ce2..ec49e1018cdfdd24d390f165e4f6a99d89a29868 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -315,14 +315,17 @@ def domainlevel(host): return level -def replica_prepare(master, replica): +def replica_prepare(master, replica, ipa_managed_dns=True): apply_common_fixes(replica) fix_apache_semaphores(replica) prepare_reverse_zone(master, replica.ip) - master.run_command(['ipa-replica-prepare', - '-p', replica.config.dirman_password, - '--ip-address', replica.ip, - replica.hostname]) + args = ['ipa-replica-prepare', + '-p', replica.config.dirman_password, + replica.hostname] + if ipa_managed_dns: + args.extend(['--ip-address', replica.ip,]) + + master.run_command(args) replica_bundle = master.get_file_contents( paths.REPLICA_INFO_GPG_TEMPLATE % replica.hostname) replica_filename = get_replica_filename(replica) @@ -330,7 +333,7 @@ def replica_prepare(master, replica): def install_replica(master, replica, setup_ca=True, setup_dns=False, - setup_kra=False): + setup_kra=False, ipa_managed_dns=True): replica.collect_log(paths.IPAREPLICA_INSTALL_LOG) replica.collect_log(paths.IPAREPLICA_CONNCHECK_LOG) allow_sync_ptr(master) @@ -343,6 +346,7 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False, if setup_ca: args.append('--setup-ca') if setup_dns: + ipa_managed_dns = True args.extend([ '--setup-dns', '--forwarder', replica.config.dns_forwarder @@ -350,7 +354,7 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False, if domainlevel(master) == DOMAIN_LEVEL_0: apply_common_fixes(replica) # prepare the replica file on master and put it to replica, AKA "old way" - replica_prepare(master, replica) + replica_prepare(master, replica, ipa_managed_dns=ipa_managed_dns) replica_filename = get_replica_filename(replica) args.append(replica_filename) else: diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py index c3d194fb4900f6ecdebffeaba90d2ecb4929c8c0..b744b227dc7204e3cd283bd3a5efb3277c920b34 100644 --- a/ipatests/test_integration/test_installation.py +++ b/ipatests/test_integration/test_installation.py @@ -21,7 +21,8 @@ class InstallTestBase1(IntegrationTest): tasks.install_master(cls.master, setup_dns=False) def test_replica0_ca_less_install(self): - tasks.install_replica(self.master, self.replicas[0], setup_ca=False) + tasks.install_replica(self.master, self.replicas[0], setup_ca=False, + ipa_managed_dns=False) def test_replica0_ipa_ca_install(self): tasks.install_ca(self.replicas[0]) -- 2.5.0
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code