[Pkg-samba-maint] [samba] 07/29: dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2

Jelmer Vernooij jelmer at moszumanska.debian.org
Fri Dec 6 23:16:44 UTC 2013


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch samba_4.1
in repository samba.

commit 2a752905f25a2f9f505de5faf3d9b853e8f7bce3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Sep 22 23:40:12 2013 +0200

    dsdb/tests/ldap: fix test_ldapServiceName against w2k8r2
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10193
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit ca173923a3937a9ed08f71bfd4ba177a6aeeaeba)
---
 source4/dsdb/tests/python/ldap.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py
index 0a95b2a..f44f4ea 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):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list