diff options
| author | Martin Babinsky <mbabinsk@redhat.com> | 2015-12-04 18:24:31 +0100 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2015-12-09 09:39:20 +0100 |
| commit | 35fae355cc4441164f149288b3d126129a82aed7 (patch) | |
| tree | bbbbbd287fdd9b06a08417be556284f3181b3724 | |
| parent | 848912ae31d1549d5f6bed874cc6c4541bada6f4 (diff) | |
CI tests: ignore disconnected domain level 1 topology on IPA master teardown
Reviewed-By: Oleg Fayans <ofayans@redhat.com>
| -rw-r--r-- | ipatests/test_integration/tasks.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py index ddbb5af29..c3681fca9 100644 --- a/ipatests/test_integration/tasks.py +++ b/ipatests/test_integration/tasks.py @@ -343,7 +343,7 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False, '--setup-dns', '--forwarder', replica.config.dns_forwarder ]) - if domainlevel(master) == 0: + 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) @@ -365,7 +365,7 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False, "-p", replica.config.dirman_password, "-U", ] - if domainlevel(master) == 0: + if domainlevel(master) == DOMAIN_LEVEL_0: args.append(replica_filename) replica.run_command(args) @@ -615,11 +615,16 @@ def kinit_admin(host): stdin_text=host.config.admin_password) -def uninstall_master(host): +def uninstall_master(host, ignore_topology_disconnect=True): host.collect_log(paths.IPASERVER_UNINSTALL_LOG) + uninstall_cmd = ['ipa-server-install', '--uninstall', '-U'] - host.run_command(['ipa-server-install', '--uninstall', '-U'], - raiseonerr=False) + host_domain_level = domainlevel(host) + + if ignore_topology_disconnect and host_domain_level != DOMAIN_LEVEL_0: + uninstall_cmd.append('--ignore-topology-disconnect') + + host.run_command(uninstall_cmd, raiseonerr=False) host.run_command(['pkidestroy', '-s', 'CA', '-i', 'pki-tomcat'], raiseonerr=False) host.run_command(['rm', '-rf', |
