| |
@@ -2,7 +2,6 @@
|
| |
from lib389.tasks import *
|
| |
from lib389.utils import *
|
| |
from lib389.topologies import topology_m2
|
| |
-
|
| |
from lib389._constants import (PLUGIN_MEMBER_OF, DEFAULT_SUFFIX, SUFFIX, HOST_MASTER_2,
|
| |
PORT_MASTER_2)
|
| |
|
| |
@@ -37,7 +36,7 @@
|
| |
topology_m2.ms["master1"].modify_s(GROUP_DN,
|
| |
[(ldap.MOD_ADD,
|
| |
'member',
|
| |
- MEMBER_VAL)])
|
| |
+ ensure_bytes(MEMBER_VAL))])
|
| |
except ldap.LDAPError as e:
|
| |
log.fatal('Failed to update group: member (%s) - error: %s' %
|
| |
(MEMBER_VAL, e.message['desc']))
|
| |
@@ -51,7 +50,7 @@
|
| |
USER_DN = ("uid=member%d,%s" % (idx, DEFAULT_SUFFIX))
|
| |
ent = master.getEntry(USER_DN, ldap.SCOPE_BASE, "(objectclass=*)")
|
| |
if presence_flag:
|
| |
- assert ent.hasAttr('memberof') and ent.getValue('memberof') == GROUP_DN
|
| |
+ assert ent.hasAttr('memberof') and ensure_str(ent.getValue('memberof')) == GROUP_DN
|
| |
else:
|
| |
assert not ent.hasAttr('memberof')
|
| |
except ldap.LDAPError as e:
|
| |
@@ -96,10 +95,10 @@
|
| |
topology_m2.ms["master1"].modify_s(ents[0].dn,
|
| |
[(ldap.MOD_REPLACE,
|
| |
'nsDS5ReplicatedAttributeListTotal',
|
| |
- '(objectclass=*) $ EXCLUDE '),
|
| |
+ b'(objectclass=*) $ EXCLUDE '),
|
| |
(ldap.MOD_REPLACE,
|
| |
'nsDS5ReplicatedAttributeList',
|
| |
- '(objectclass=*) $ EXCLUDE memberOf')])
|
| |
+ b'(objectclass=*) $ EXCLUDE memberOf')])
|
| |
topology_m2.ms["master1"].restart(timeout=10)
|
| |
|
| |
#
|
| |
@@ -131,7 +130,7 @@
|
| |
topology_m2.ms["master1"].agreement.init(SUFFIX, HOST_MASTER_2, PORT_MASTER_2)
|
| |
topology_m2.ms["master1"].waitForReplInit(ents[0].dn)
|
| |
|
| |
- # Check that for total update memberof was on both side
|
| |
+ # Check that for total update memberof was on both side
|
| |
# because memberof is NOT excluded from total init
|
| |
time.sleep(5)
|
| |
_check_memberof(topology_m2.ms["master1"], True)
|
| |
@@ -147,3 +146,4 @@
|
| |
# -s for DEBUG mode
|
| |
CURRENT_FILE = os.path.realpath(__file__)
|
| |
pytest.main("-s %s" % CURRENT_FILE)
|
| |
+
|
| |
Description: Added py3 support by explicitly changing strings to bytes.
https://pagure.io/389-ds-base/issue/49588
Reviewed by: ??