From be6f1a67cbf3e08ee0749dc1fe158f585e5546b7 Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Wed, 20 Sep 2017 17:48:28 +0200 Subject: [PATCH] ipatests: set default 389-ds log level to 0 During integration tests, the log level of 8192 (replication debugging) was excessive and made reading 389-ds logs very hard without providing any useful information. Part of: https://pagure.io/freeipa/issue/7162 Signed-off-by: Tomas Krizek Reviewed-By: Thierry Bordaz Reviewed-By: Rob Crittenden --- ipatests/pytest_plugins/integration/tasks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipatests/pytest_plugins/integration/tasks.py b/ipatests/pytest_plugins/integration/tasks.py index 253508ec4..381c8b607 100644 --- a/ipatests/pytest_plugins/integration/tasks.py +++ b/ipatests/pytest_plugins/integration/tasks.py @@ -236,14 +236,14 @@ def restore_hostname(host): host.run_command(['rm', backupname]) -def enable_replication_debugging(host): - logger.info('Enable LDAP replication logging') +def enable_replication_debugging(host, log_level=0): + logger.info('Set LDAP debug level') logging_ldif = textwrap.dedent(""" dn: cn=config changetype: modify replace: nsslapd-errorlog-level - nsslapd-errorlog-level: 8192 - """) + nsslapd-errorlog-level: {log_level} + """.format(log_level=log_level)) host.run_command(['ldapmodify', '-x', '-D', str(host.config.dirman_dn), '-w', host.config.dirman_password,