From ca173923a3937a9ed08f71bfd4ba177a6aeeaeba Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 22 Sep 2013 23:40:12 +0200 Subject: 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 --- source4/dsdb/tests/python/ldap.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4') 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): -- cgit