This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch master
in repository 389-ds-base.
commit 0f95ada946fd6aeb1a4bb5168034a474aebd790b
Author: Akshay Adhikari <aadhikar(a)aadhikar.pnq.csb>
Date: Thu Jan 18 18:16:16 2018 +0530
Issue 48006 - Add a new CI test case
Bug Description: Missing warning for invalid replica backoff configuration
Fix Description: Add a test case that will check the invalid replica backoff
configuration
(the case when nsds5ReplicaBackoffMin is set to the bigger value than
nsds5ReplicaBackoffMax)
https://pagure.io/389-ds-base/issue/48006
Reviewed by: spichugi, wibrown (Thanks!)
Signed-off-by: Simon Pichugin <spichugi(a)redhat.com>
---
.../tests/suites/replication/acceptance_test.py | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/dirsrvtests/tests/suites/replication/acceptance_test.py
b/dirsrvtests/tests/suites/replication/acceptance_test.py
index c524547..bdbfd20 100644
--- a/dirsrvtests/tests/suites/replication/acceptance_test.py
+++ b/dirsrvtests/tests/suites/replication/acceptance_test.py
@@ -7,6 +7,7 @@
# --- END COPYRIGHT BLOCK ---
#
import pytest
+from lib389.replica import Replicas
from lib389.tasks import *
from lib389.utils import *
from lib389.topologies import topology_m4 as topo_m4
@@ -475,6 +476,29 @@ def test_invalid_agmt(topo_m4):
except ldap.LDAPError as e:
m1.log.fatal('Failed to bind: ' + str(e))
assert False
+def test_warining_for_invalid_replica(topo_m4):
+ """Testing logs to indicate the inconsistency when configuration is
performed.
+
+ :id: dd689d03-69b8-4bf9-a06e-2acd19d5e2c8
+ :setup: MMR with four masters
+ :steps:
+ 1. Setup nsds5ReplicaBackoffMin to 20
+ 2. Setup nsds5ReplicaBackoffMax to 10
+ :expectedresults:
+ 1. nsds5ReplicaBackoffMin should set to 20
+ 2. An error should be generated and also logged in the error logs.
+ """
+ replicas = Replicas(topo_m4.ms["master1"])
+ replica = replicas.list()[0]
+ log.info('Set nsds5ReplicaBackoffMin to 20')
+ replica.set('nsds5ReplicaBackoffMin', '20')
+ with pytest.raises(ldap.UNWILLING_TO_PERFORM):
+ log.info('Set nsds5ReplicaBackoffMax to 10')
+ replica.set('nsds5ReplicaBackoffMax', '10')
+ log.info('Resetting configuration: nsds5ReplicaBackoffMin')
+ replica.remove_all('nsds5ReplicaBackoffMin')
+ log.info('Check the error log for the error')
+ assert
topo_m4.ms["master1"].ds_error_log.match('.*nsds5ReplicaBackoffMax.*10.*invalid.*')
if __name__ == '__main__':
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.