Skip to content

Commit

Permalink
Fix replica_promotion-domlevel0 test failures
Browse files Browse the repository at this point in the history
Integration test is failing due to wrong message being
displayed by ipa. This issue was most probably introduced
by PR:
f51869b
Error messages for domain level 0 and >=1 cases were basically
swapped. This PR is swapping them back.

Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
  • Loading branch information
Alexander Koksharov authored and tiran committed Feb 7, 2018
1 parent e1e6f13 commit 7811b66
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ipaserver/install/server/replicainstall.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7811b66

Please sign in to comment.