summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-08-20 15:34:34 +0200
committerMartin Kosek <mkosek@redhat.com>2014-08-21 14:07:01 +0200
commita8ba6b3b8cdaf39152bce394ad419d28037f687e (patch)
tree31539dbdb7c2c87bae69c7a5ef0d21b7f8877e80 /ipatests
parent8fabd6dde152fc394bd4f093d93c8a46e5b2851b (diff)
downloadfreeipa-a8ba6b3b8cdaf39152bce394ad419d28037f687e.tar.gz
freeipa-a8ba6b3b8cdaf39152bce394ad419d28037f687e.tar.xz
freeipa-a8ba6b3b8cdaf39152bce394ad419d28037f687e.zip
service: Normalize service principal in get_dn
This will make any lookup go through the normalization. Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_xmlrpc/test_service_plugin.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/ipatests/test_xmlrpc/test_service_plugin.py b/ipatests/test_xmlrpc/test_service_plugin.py
index 5be27af9e..40eb7eca5 100644
--- a/ipatests/test_xmlrpc/test_service_plugin.py
+++ b/ipatests/test_xmlrpc/test_service_plugin.py
@@ -33,7 +33,8 @@ from ipapython.dn import DN
fqdn1 = u'testhost1.%s' % api.env.domain
fqdn2 = u'testhost2.%s' % api.env.domain
fqdn3 = u'TestHost3.%s' % api.env.domain
-service1 = u'HTTP/%s@%s' % (fqdn1, api.env.realm)
+service1_no_realm = u'HTTP/%s' % fqdn1
+service1 = u'%s@%s' % (service1_no_realm, api.env.realm)
hostprincipal1 = u'host/%s@%s' % (fqdn1, api.env.realm)
service1dn = DN(('krbprincipalname',service1),('cn','services'),('cn','accounts'),api.env.basedn)
host1dn = DN(('fqdn',fqdn1),('cn','computers'),('cn','accounts'),api.env.basedn)
@@ -667,7 +668,7 @@ class test_service_in_role(Declarative):
dict(
desc='Create %r' % service1,
- command=('service_add', [service1], dict(force=True)),
+ command=('service_add', [service1_no_realm], dict(force=True)),
expected=dict(
value=service1,
summary=u'Added service "%s"' % service1,
@@ -698,7 +699,8 @@ class test_service_in_role(Declarative):
dict(
desc='Add %r to %r' % (service1, role1),
- command=('role_add_member', [role1], dict(service=service1)),
+ command=('role_add_member', [role1],
+ dict(service=service1_no_realm)),
expected=dict(
failed=dict(
member=dict(
@@ -721,7 +723,7 @@ class test_service_in_role(Declarative):
dict(
desc='Verify %r is member of %r' % (service1, role1),
- command=('service_show', [service1], {}),
+ command=('service_show', [service1_no_realm], {}),
expected=dict(
value=service1,
summary=None,