1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

selftest: Do not use dn= filter string

This accidentially worked with SCOPE_ONELEVEL against Samba but dn= filters are
not valid in AD.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2017-12-20 14:55:04 +13:00
parent 0e571054a6
commit 44eee9ce9e

View File

@ -50,7 +50,7 @@ class SitesCmdTestCase(BaseSitesCmdTestCase):
dnsite = ldb.Dn(self.samdb, "CN=%s,%s" % (sitename, dnsites))
ret = self.samdb.search(base=dnsites, scope=ldb.SCOPE_ONELEVEL,
expression='(dn=%s)' % str(dnsite))
expression='(cn=%s)' % sitename)
self.assertEquals(len(ret), 1)
# now delete it
@ -106,7 +106,7 @@ class SitesSubnetCmdTestCase(BaseSitesCmdTestCase):
(cidr, self.config_dn)))
ret = self.samdb.search(base=dnsubnets, scope=ldb.SCOPE_ONELEVEL,
expression='(dn=%s)' % dnsubnet)
expression='(CN=%s)' % cidr)
self.assertIsNotNone(ret)
self.assertEqual(len(ret), 1)
self.samdb.delete(dnsubnet, ["tree_delete:0"])