|
@@ -24,13 +24,14 @@ DST_ENTRY_CN = SRC_ENTRY_CN + EXT_RDN
|
|
|
SRC_ENTRY_DN = "cn=%s,%s" % (SRC_ENTRY_CN, SUFFIX)
|
|
SRC_ENTRY_DN = "cn=%s,%s" % (SRC_ENTRY_CN, SUFFIX)
|
|
|
DST_ENTRY_DN = "cn=%s,%s" % (DST_ENTRY_CN, SUFFIX)
|
|
DST_ENTRY_DN = "cn=%s,%s" % (DST_ENTRY_CN, SUFFIX)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
class TopologyStandalone(object):
|
|
class TopologyStandalone(object):
|
|
|
def __init__(self, standalone):
|
|
def __init__(self, standalone):
|
|
|
standalone.open()
|
|
standalone.open()
|
|
|
self.standalone = standalone
|
|
self.standalone = standalone
|
|
|
|
|
|
|
|
|
|
|
|
|
-#@pytest.fixture(scope="module")
|
|
|
|
|
|
|
[email protected](scope="module")
|
|
|
def topology(request):
|
|
def topology(request):
|
|
|
global installation1_prefix
|
|
global installation1_prefix
|
|
|
|
|
|
|
@@ -55,6 +56,7 @@ def topology(request):
|
|
|
|
|
|
|
|
return TopologyStandalone(standalone)
|
|
return TopologyStandalone(standalone)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def test_ticket47553_rdn_write_init(topology):
|
|
def test_ticket47553_rdn_write_init(topology):
|
|
|
topology.standalone.log.info("\n\n######################### Add entry tuser ######################\n")
|
|
topology.standalone.log.info("\n\n######################### Add entry tuser ######################\n")
|
|
|
topology.standalone.add_s(Entry((SRC_ENTRY_DN, {
|
|
topology.standalone.add_s(Entry((SRC_ENTRY_DN, {
|
|
@@ -62,6 +64,7 @@ def test_ticket47553_rdn_write_init(topology):
|
|
|
'sn': SRC_ENTRY_CN,
|
|
'sn': SRC_ENTRY_CN,
|
|
|
'cn': SRC_ENTRY_CN})))
|
|
'cn': SRC_ENTRY_CN})))
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def test_ticket47553_rdn_write_get_ger(topology):
|
|
def test_ticket47553_rdn_write_get_ger(topology):
|
|
|
ANONYMOUS_DN = ""
|
|
ANONYMOUS_DN = ""
|
|
|
topology.standalone.log.info("\n\n######################### GER rights for anonymous ######################\n")
|
|
topology.standalone.log.info("\n\n######################### GER rights for anonymous ######################\n")
|
|
@@ -75,6 +78,7 @@ def test_ticket47553_rdn_write_get_ger(topology):
|
|
|
topology.standalone.log.info("############### entryLevelRights: %r" % value)
|
|
topology.standalone.log.info("############### entryLevelRights: %r" % value)
|
|
|
assert 'n' not in value
|
|
assert 'n' not in value
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def test_ticket47553_rdn_write_modrdn_anonymous(topology):
|
|
def test_ticket47553_rdn_write_modrdn_anonymous(topology):
|
|
|
ANONYMOUS_DN = ""
|
|
ANONYMOUS_DN = ""
|
|
|
topology.standalone.close()
|
|
topology.standalone.close()
|
|
@@ -82,13 +86,11 @@ def test_ticket47553_rdn_write_modrdn_anonymous(topology):
|
|
|
topology.standalone.open()
|
|
topology.standalone.open()
|
|
|
msg_id = topology.standalone.search_ext("", ldap.SCOPE_BASE, "objectclass=*")
|
|
msg_id = topology.standalone.search_ext("", ldap.SCOPE_BASE, "objectclass=*")
|
|
|
rtype, rdata, rmsgid, response_ctrl = topology.standalone.result3(msg_id)
|
|
rtype, rdata, rmsgid, response_ctrl = topology.standalone.result3(msg_id)
|
|
|
- value = ''
|
|
|
|
|
for dn, attrs in rdata:
|
|
for dn, attrs in rdata:
|
|
|
topology.standalone.log.info("dn: %s" % dn)
|
|
topology.standalone.log.info("dn: %s" % dn)
|
|
|
for attr in attrs:
|
|
for attr in attrs:
|
|
|
topology.standalone.log.info("############### %r: %r" % (attr, attrs[attr]))
|
|
topology.standalone.log.info("############### %r: %r" % (attr, attrs[attr]))
|
|
|
|
|
|
|
|
-
|
|
|
|
|
try:
|
|
try:
|
|
|
topology.standalone.rename_s(SRC_ENTRY_DN, "cn=%s" % DST_ENTRY_CN, delold=True)
|
|
topology.standalone.rename_s(SRC_ENTRY_DN, "cn=%s" % DST_ENTRY_CN, delold=True)
|
|
|
except Exception as e:
|
|
except Exception as e:
|
|
@@ -102,6 +104,7 @@ def test_ticket47553_rdn_write_modrdn_anonymous(topology):
|
|
|
topology.standalone.log.info("The entry was not renamed (expected)")
|
|
topology.standalone.log.info("The entry was not renamed (expected)")
|
|
|
isinstance(e, ldap.NO_SUCH_OBJECT)
|
|
isinstance(e, ldap.NO_SUCH_OBJECT)
|
|
|
|
|
|
|
|
|
|
+
|
|
|
def test_ticket47553_rdn_write(topology):
|
|
def test_ticket47553_rdn_write(topology):
|
|
|
'''
|
|
'''
|
|
|
Write your testcase here...
|
|
Write your testcase here...
|