From 7811b662f16033406bdb44c24fb4f11778439bf5 Mon Sep 17 00:00:00 2001 From: Alexander Koksharov Date: Feb 07 2018 13:59:21 +0000 Subject: Fix replica_promotion-domlevel0 test failures Integration test is failing due to wrong message being displayed by ipa. This issue was most probably introduced by PR: https://github.com/freeipa/freeipa/commit/f51869bf5214e2d2322f85bf72b7ae86b6893974 Error messages for domain level 0 and >=1 cases were basically swapped. This PR is swapping them back. Reviewed-By: Tibor Dudlak --- diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py index 6aa1157..78b450d 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -787,8 +787,12 @@ def install_check(installer): check_domain_level_is_supported(domain_level) if domain_level != constants.DOMAIN_LEVEL_0: raise RuntimeError( - "You must provide a file generated by ipa-replica-prepare to " - "create a replica when the domain is at level 0." + "You used the wrong mechanism to install a replica in " + "domain level {dl}:\n" + "\tFor domain level >= 1 replica installation, first join the " + "domain by running ipa-client-install, then run " + "ipa-replica-install without a replica file." + .format(dl=domain_level) ) # Check pre-existing host entry @@ -1128,12 +1132,8 @@ def promote_check(installer): check_domain_level_is_supported(domain_level) if domain_level < constants.DOMAIN_LEVEL_1: raise RuntimeError( - "You used the wrong mechanism to install a replica in " - "domain level {dl}:\n" - "\tFor domain level >= 1 replica installation, first join the " - "domain by running ipa-client-install, then run " - "ipa-replica-install without a replica file." - .format(dl=domain_level) + "You must provide a file generated by ipa-replica-prepare to " + "create a replica when the domain is at level 0." ) # Check authorization