summaryrefslogtreecommitdiffstats
path: root/ipatests/test_xmlrpc
diff options
context:
space:
mode:
authorLenka Doudova <ldoudova@redhat.com>2016-09-20 09:15:36 +0200
committerMartin Basti <mbasti@redhat.com>2016-09-21 18:46:37 +0200
commit8a947e2fd0d62df9a68252c1f7505451347b0c7d (patch)
treef02a65623c15a3c58cd8c776072e429e974e690f /ipatests/test_xmlrpc
parentc0fcfb31ecb2d17c3484d752edf55a42ef04ead7 (diff)
downloadfreeipa-8a947e2fd0d62df9a68252c1f7505451347b0c7d.tar.gz
freeipa-8a947e2fd0d62df9a68252c1f7505451347b0c7d.tar.xz
freeipa-8a947e2fd0d62df9a68252c1f7505451347b0c7d.zip
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 <mbasti@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc')
-rw-r--r--ipatests/test_xmlrpc/test_host_plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py
index 7e1dad0b9..279186b70 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