From: Stefan Metzmacher Date: Sun, 22 Sep 2013 21:40:12 +0000 (+0200) Subject: dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=ca173923a3937a9ed08f71bfd4ba177a6aeeaeba;p=mat%2Fsamba.git dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10193 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- 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):