Skip to content

Commit

Permalink
Issue 4750 - Fix compiler warning in retrocl (#4751)
Browse files Browse the repository at this point in the history
Description: An unused variable generates a compiler warning.

Fix description: Remove unused variable. Modify CI test to restart the test instance instead
		         of using dynamic plugins.

Fixes: #4750

Relates: #4701

Reviewed by: jchapma (One line commit rule)
  • Loading branch information
jchapma committed Jun 3, 2021
1 parent 3d31c6c commit a08540a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
30 changes: 12 additions & 18 deletions dirsrvtests/tests/suites/retrocl/basic_test.py
Expand Up @@ -60,13 +60,6 @@ def test_retrocl_exclude_attr_add(topology_st):

st = topology_st.standalone

log.info('Enable dynamic plugins')
try:
st.config.set('nsslapd-dynamic-plugins', 'on')
except ldap.LDAPError as e:
ldap.error('Failed to enable dynamic plugins ' + e.args[0]['desc'])
assert False

log.info('Configure retrocl plugin')
rcl = RetroChangelogPlugin(st)
rcl.disable()
Expand Down Expand Up @@ -131,8 +124,12 @@ def test_retrocl_exclude_attr_add(topology_st):
disconnect_instance(inst)
assert result is None

log.info("5s delay for retrocl plugin to restart")
time.sleep(5)
log.info('Restarting instance')
try:
st.restart()
except ldap.LDAPError as e:
ldap.error('Failed to restart instance ' + e.args[0]['desc'])
assert False

log.info('Adding user2')
try:
Expand Down Expand Up @@ -195,13 +192,6 @@ def test_retrocl_exclude_attr_mod(topology_st):

st = topology_st.standalone

log.info('Enable dynamic plugins')
try:
st.config.set('nsslapd-dynamic-plugins', 'on')
except ldap.LDAPError as e:
ldap.error('Failed to enable dynamic plugins ' + e.args[0]['desc'])
assert False

log.info('Configure retrocl plugin')
rcl = RetroChangelogPlugin(st)
rcl.disable()
Expand Down Expand Up @@ -266,8 +256,12 @@ def test_retrocl_exclude_attr_mod(topology_st):
disconnect_instance(inst)
assert result is None

log.info("5s delay for retrocl plugin to restart")
time.sleep(5)
log.info('Restarting instance')
try:
st.restart()
except ldap.LDAPError as e:
ldap.error('Failed to restart instance ' + e.args[0]['desc'])
assert False

log.info('Modify user1 carLicense attribute')
try:
Expand Down
1 change: 0 additions & 1 deletion ldap/servers/plugins/retrocl/retrocl.c
Expand Up @@ -400,7 +400,6 @@ retrocl_start(Slapi_PBlock *pb)

for (size_t i = 0; i < num_vals; i++) {
char *value = values[i];

char *pos = strchr(value, ':');
if (pos == NULL) {
retrocl_exclude_attrs[i] = slapi_ch_strdup(value);
Expand Down

0 comments on commit a08540a

Please sign in to comment.