summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2014-01-14 14:23:47 -0500
committerMartin Kosek <mkosek@redhat.com>2014-01-15 10:02:57 +0100
commit0fe745ef0ae8bb77adf711a9b166df737e221e22 (patch)
treee2b2096c6d05ddc84cce85d9e5f86379e94fdc5a /ipatests
parentfdce36ccc13f68e4019064c69ef4f5adf61ef681 (diff)
downloadfreeipa.git-0fe745ef0ae8bb77adf711a9b166df737e221e22.tar.gz
freeipa.git-0fe745ef0ae8bb77adf711a9b166df737e221e22.tar.xz
freeipa.git-0fe745ef0ae8bb77adf711a9b166df737e221e22.zip
Change the way we determine if the host has a password set.
When creating a host with a password we don't set a Kerberos principal or add the Kerberos objectclasses. Those get added when the host is enrolled. If one passed in --password= (so no password) then we incorrectly thought the user was in fact setting a password, so the principal and objectclasses weren't updated. https://fedorahosted.org/freeipa/ticket/4102
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_xmlrpc/test_host_plugin.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/ipatests/test_xmlrpc/test_host_plugin.py b/ipatests/test_xmlrpc/test_host_plugin.py
index a23a3411..7b64398f 100644
--- a/ipatests/test_xmlrpc/test_host_plugin.py
+++ b/ipatests/test_xmlrpc/test_host_plugin.py
@@ -863,6 +863,33 @@ class test_host(Declarative):
),
),
+
+ dict(
+ desc='Create a host with a NULL password',
+ command=('host_add', [fqdn3],
+ dict(
+ description=u'Test host 3',
+ force=True,
+ userpassword=None,
+ ),
+ ),
+ expected=dict(
+ value=fqdn3,
+ summary=u'Added host "%s"' % fqdn3,
+ result=dict(
+ dn=dn3,
+ fqdn=[fqdn3],
+ description=[u'Test host 3'],
+ krbprincipalname=[u'host/%s@%s' % (fqdn3, api.env.realm)],
+ objectclass=objectclasses.host,
+ ipauniqueid=[fuzzy_uuid],
+ managedby_host=[u'%s' % fqdn3],
+ has_keytab=False,
+ has_password=False,
+ ),
+ ),
+ ),
+
]
class test_host_false_pwd_change(XMLRPC_test):