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>
This commit is contained in:
Oleg Fayans
2016-04-14 16:39:10 +02:00
committed by Martin Basti
parent 93871bf017
commit c061172792
2 changed files with 27 additions and 0 deletions

View File

@@ -351,3 +351,29 @@ class TestProhibitReplicaUninstallation(IntegrationTest):
in result.stdout_text), ("Expected error message was not found") in result.stdout_text), ("Expected error message was not found")
self.replicas[0].run_command(['ipa-server-install', '--uninstall', self.replicas[0].run_command(['ipa-server-install', '--uninstall',
'-U', '--ignore-topology-disconnect']) '-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)

View File

@@ -230,6 +230,7 @@ ipa_class_members = {
{'transport': ['put_file']}, {'transport': ['put_file']},
'put_file_contents', 'put_file_contents',
'get_file_contents', 'get_file_contents',
'ldap_connect',
]}, ]},
'replicas', 'replicas',
'clients', 'clients',