From 8a947e2fd0d62df9a68252c1f7505451347b0c7d Mon Sep 17 00:00:00 2001 From: Lenka Doudova Date: Sep 21 2016 16:46:37 +0000 Subject: Tests: Fix host attributes in ipa-join host test Fixing discrepancies between returned and checked attributes in ipa-join host test, that arose after recent changes in behavior. https://fedorahosted.org/freeipa/ticket/6326 Reviewed-By: Martin Basti --- diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py index 7e1dad0..279186b 100644 --- a/ipatests/test_xmlrpc/test_host_plugin.py +++ b/ipatests/test_xmlrpc/test_host_plugin.py @@ -533,7 +533,10 @@ class TestHostFalsePwdChange(XMLRPC_test): # create a test host with bulk enrollment password host.track_create() + # manipulate host.attrs to correspond with real attributes of host + # after creating it with random password del host.attrs['krbprincipalname'] + del host.attrs['krbcanonicalname'] host.attrs['has_password'] = True objclass = list(set( host.attrs['objectclass']) - {u'krbprincipal', u'krbprincipalaux'}) @@ -565,10 +568,13 @@ class TestHostFalsePwdChange(XMLRPC_test): # the keytab is not necessary for further tests print(e) + # fix host.attrs again to correspond with current state host.attrs['has_keytab'] = True host.attrs['has_password'] = False host.attrs['krbprincipalname'] = [u'host/%s@%s' % (host.fqdn, host.api.env.realm)] + host.attrs['krbcanonicalname'] = [u'host/%s@%s' % (host.fqdn, + host.api.env.realm)] host.retrieve() # Try to change the password of enrolled host with specified password