summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-22 23:40:12 +0200
committerStefan Metzmacher <metze@samba.org>2013-10-10 08:35:10 +0200
commitca173923a3937a9ed08f71bfd4ba177a6aeeaeba (patch)
tree6d57b1af2878ac08b4eb92c5ecad7b3c156b1689 /source4/dsdb
parentb197de754f5359f02f786bcd5e8a7671fb0bb48b (diff)
downloadsamba-ca173923a3937a9ed08f71bfd4ba177a6aeeaeba.tar.gz
samba-ca173923a3937a9ed08f71bfd4ba177a6aeeaeba.tar.bz2
samba-ca173923a3937a9ed08f71bfd4ba177a6aeeaeba.zip
dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10193 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rwxr-xr-xsource4/dsdb/tests/python/ldap.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 0a95b2a103..f44f4eaf57 100755
--- a/source4/dsdb/tests/python/ldap.py
+++ b/source4/dsdb/tests/python/ldap.py
@@ -2980,12 +2980,16 @@ class BaseDnTests(samba.tests.TestCase):
def test_ldapServiceName(self):
"""Testing the ldap service name in rootDSE"""
res = self.ldb.search("", scope=SCOPE_BASE,
- attrs=["ldapServiceName", "dNSHostName"])
+ attrs=["ldapServiceName", "dnsHostName"])
self.assertEquals(len(res), 1)
+ self.assertTrue("ldapServiceName" in res[0])
+ self.assertTrue("dnsHostName" in res[0])
- (hostname, _, dns_domainname) = res[0]["dNSHostName"][0].partition(".")
- self.assertTrue(":%s$@%s" % (hostname, dns_domainname.upper())
- in res[0]["ldapServiceName"][0])
+ (hostname, _, dns_domainname) = res[0]["dnsHostName"][0].partition(".")
+
+ given = res[0]["ldapServiceName"][0]
+ expected = "%s:%s$@%s" % (dns_domainname.lower(), hostname.lower(), dns_domainname.upper())
+ self.assertEquals(given, expected)
if not "://" in host:
if os.path.isfile(host):