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 4c4d3c13ab8e7be8e62c2321f93590efecbdb453
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Tue Nov 7 19:34:02 2017 +0100
Issue 49408 - Add a test case for nsds5ReplicaId checks
Description: We need to check that nsDS5ReplicaId accepts
only valid values and rejects invalid ones.
https://pagure.io/389-ds-base/issue/49408
Reviewed by: wibrown (Thanks!)
---
.../suites/replication/replica_config_test.py | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/dirsrvtests/tests/suites/replication/replica_config_test.py
b/dirsrvtests/tests/suites/replication/replica_config_test.py
index 50ea2ec..add4d80 100644
--- a/dirsrvtests/tests/suites/replication/replica_config_test.py
+++ b/dirsrvtests/tests/suites/replication/replica_config_test.py
@@ -389,6 +389,34 @@ def test_agmt_num_modify(topo, attr, too_small, too_big, overflow,
notnum, valid
assert False
+def test_replicaid_modification(topo):
+ """Check that nsDS5ReplicaId accepts only valid values
+
+ :id: 7dcab36f-2113-4e24-ab3d-01843ce65cac
+ :setup: Standalone instance
+ :steps:
+ 1. Enable replication
+ 2. Try to set valid values to nsDS5ReplicaId
+ 3. Try to set invalid values to nsDS5ReplicaId
+ :expectedresults:
+ 1. Operation should be successful
+ 2. Operation should be successful
+ 3. Unwilling to perform error should be raised
+ """
+
+ log.info('Add a replica entry')
+ replica = topo.standalone.replicas.enable(suffix=DEFAULT_SUFFIX,
+ role=ReplicaRole.MASTER,
+ replicaID=REPLICAID_MASTER_1)
+
+ log.info('Set {} to valid value'.format(REPL_ID))
+ replica.set(REPL_ID, str(REPLICAID_MASTER_1 + 1))
+
+ log.info('Set {} to invalid value'.format(REPL_ID))
+ with pytest.raises(ldap.UNWILLING_TO_PERFORM):
+ replica.set(REPL_ID, "wrong_id")
+
+
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.