diff options
author | Oleg Fayans <ofayans@redhat.com> | 2016-04-14 16:39:10 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-04-15 15:44:09 +0200 |
commit | c06117279212ec3f76762c633c0215c6d8a377e8 (patch) | |
tree | ab2e075627afe730575549ac35bddd62e08c4802 /ipatests | |
parent | 93871bf017e1bc5f2c176aa3419278d49fcc003b (diff) | |
download | freeipa-c06117279212ec3f76762c633c0215c6d8a377e8.tar.gz freeipa-c06117279212ec3f76762c633c0215c6d8a377e8.tar.xz freeipa-c06117279212ec3f76762c633c0215c6d8a377e8.zip |
Add test if replica is working after domain upgrade
Corresponds to the testcase described in
http://www.freeipa.org/page/V4/Replica_Promotion/Test_plan#Test_case:
_Replica_created_using_old_workflow_is_functional_after_domain_upgrade
https://fedorahosted.org/freeipa/ticket/5723
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_integration/test_replica_promotion.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ipatests/test_integration/test_replica_promotion.py b/ipatests/test_integration/test_replica_promotion.py index 85beaec45..1f683b6d5 100644 --- a/ipatests/test_integration/test_replica_promotion.py +++ b/ipatests/test_integration/test_replica_promotion.py @@ -351,3 +351,29 @@ class TestProhibitReplicaUninstallation(IntegrationTest): in result.stdout_text), ("Expected error message was not found") self.replicas[0].run_command(['ipa-server-install', '--uninstall', '-U', '--ignore-topology-disconnect']) + + +class TestOldReplicaWorksAfterDomainUpgrade(IntegrationTest): + topology = 'star' + num_replicas = 1 + domain_level = DOMAIN_LEVEL_0 + username = 'testuser' + + def test_replica_after_domain_upgrade(self): + tasks.kinit_admin(self.master) + tasks.kinit_admin(self.replicas[0]) + self.master.run_command(['ipa', 'user-add', self.username, + '--first', 'test', + '--last', 'user']) + tasks.wait_for_replication(self.replicas[0].ldap_connect()) + self.master.run_command(['ipa', 'domainlevel-set', + str(DOMAIN_LEVEL_1)]) + result = self.replicas[0].run_command(['ipa', 'user-show', + self.username]) + assert("User login: %s" % self.username in result.stdout_text), ( + "A testuser was not found on replica after domain upgrade") + self.replicas[0].run_command(['ipa', 'user-del', self.username]) + tasks.wait_for_replication(self.master.ldap_connect()) + result1 = self.master.run_command(['ipa', 'user-show', self.username], + raiseonerr=False) + assert_error(result1, "%s: user not found" % self.username, 2) |