dirsrvtests/tickets/ticket47490_test.py | 37 +++++++--------------
dirsrvtests/tickets/ticket47553_single_aci_test.py | 6 +--
dirsrvtests/tickets/ticket47619_test.py | 3 -
3 files changed, 18 insertions(+), 28 deletions(-)
New commits:
commit 48253af53658fcc33e8fef44be2bc4da996b83fb
Author: Thierry bordaz (tbordaz) <tbordaz(a)redhat.com>
Date: Fri Apr 25 11:26:54 2014 +0200
Ticket 47721 - Schema Replication Issue (follow up + cleanup)
Fix Description:
Fix test cases 47490
Fix test cases 47553 (py.test fixture commented)
Fix test cases 47619 (task timeout not yet in lib389)
Forget to change (char *) into (const char *)
https://fedorahosted.org/389/ticket/47721
Reviewed by: Rich Megginson
Platforms tested: F19
Flag Day: no
Doc impact: no
diff --git a/dirsrvtests/tickets/ticket47490_test.py
b/dirsrvtests/tickets/ticket47490_test.py
index 438723a..eee4cca 100644
--- a/dirsrvtests/tickets/ticket47490_test.py
+++ b/dirsrvtests/tickets/ticket47490_test.py
@@ -331,10 +331,10 @@ def test_ticket47490_one(topology):
def test_ticket47490_two(topology):
"""
- Summary: Extra OC Schema is NOT pushed - error
+ Summary: Extra OC Schema is pushed - (ticket 47721 allows to learn missing def)
If consumer schema is a superset (one extra OC) of supplier schema, then
- schema is not pushed and there is a message in the error log
+ schema is pushed and there is a message in the error log
State at startup
- supplier +masterNewOCA
- consumer +masterNewOCA
@@ -357,14 +357,15 @@ def test_ticket47490_two(topology):
consumer_schema_csn = topology.consumer.schema.get_schema_csn()
# Check the schemaCSN was NOT updated on the consumer
+ # with 47721, supplier learns the missing definition
log.debug("test_ticket47490_two master_schema_csn=%s", master_schema_csn)
log.debug("test_ticket47490_two consumer_schema_csn=%s",
consumer_schema_csn)
assert master_schema_csn != consumer_schema_csn
# Check the error log of the supplier does not contain an error
+ # This message may happen during the learning phase
regex = re.compile("must not be overwritten \(set replication log for additional
info\)")
res = pattern_errorlog(topology.master.errorlog_file, regex)
- assert res
def test_ticket47490_three(topology):
@@ -435,10 +436,10 @@ def test_ticket47490_four(topology):
def test_ticket47490_five(topology):
"""
- Summary: Same OC - extra MUST: Schema is NOT pushed - error
+ Summary: Same OC - extra MUST: Schema is pushed - (fix for 47721)
If consumer schema is a superset (OC with more MUST), then
- schema is not pushed and there is a message in the error log
+ schema is pushed (fix for 47721) and there is a message in the error log
State at startup
- supplier +masterNewOCA +masterNewOCB +consumerNewOCA
+must=telexnumber
@@ -466,21 +467,15 @@ def test_ticket47490_five(topology):
consumer_schema_csn = topology.consumer.schema.get_schema_csn()
# Check the schemaCSN was NOT updated on the consumer
+ # with 47721, supplier learns the missing definition
log.debug("test_ticket47490_five master_schema_csn=%s", master_schema_csn)
log.debug("ctest_ticket47490_five onsumer_schema_csn=%s",
consumer_schema_csn)
assert master_schema_csn != consumer_schema_csn
- #Check that replication logging display additional message about
'telexNumber' not being
- # required in the master schema
- # This message appears before 'must not be overwritten' so it should be check
first
- regex = re.compile("Attribute telexNumber is not required in
'consumerNewOCA' of the local supplier schema")
- res = pattern_errorlog(topology.master.errorlog_file, regex)
- assert res != None
-
# Check the error log of the supplier does not contain an error
+ # This message may happen during the learning phase
regex = re.compile("must not be overwritten \(set replication log for additional
info\)")
res = pattern_errorlog(topology.master.errorlog_file, regex)
- assert res != None
def test_ticket47490_six(topology):
"""
@@ -517,6 +512,7 @@ def test_ticket47490_six(topology):
assert master_schema_csn == consumer_schema_csn
# Check the error log of the supplier does not contain an error
+ # This message may happen during the learning phase
regex = re.compile("must not be overwritten \(set replication log for additional
info\)")
res = pattern_errorlog(topology.master.errorlog_file, regex)
assert res == None
@@ -563,10 +559,10 @@ def test_ticket47490_seven(topology):
def test_ticket47490_eight(topology):
"""
- Summary: Same OC - extra MAY: Schema is NOT pushed - error
+ Summary: Same OC - extra MAY: Schema is pushed (fix for 47721)
If consumer schema is a superset (OC with more MAY), then
- schema is not pushed and there is message in the error log
+ schema is pushed (fix for 47721) and there is message in the error log
State at startup
- supplier +masterNewOCA +masterNewOCB +consumerNewOCA
+masterNewOCC
+must=telexnumber +must=telexnumber
@@ -593,21 +589,16 @@ def test_ticket47490_eight(topology):
consumer_schema_csn = topology.consumer.schema.get_schema_csn()
# Check the schemaCSN was not updated on the consumer
+ # with 47721, supplier learns the missing definition
log.debug("test_ticket47490_eight master_schema_csn=%s",
master_schema_csn)
log.debug("ctest_ticket47490_eight onsumer_schema_csn=%s",
consumer_schema_csn)
assert master_schema_csn != consumer_schema_csn
- #Check that replication logging display additional message about
'postOfficeBox' not being
- # allowed in the master schema
- # This message appears before 'must not be overwritten' so it should be check
first
- regex = re.compile("Attribute postOfficeBox is not allowed in
'consumerNewOCA' of the local supplier schema")
- res = pattern_errorlog(topology.master.errorlog_file, regex)
- assert res != None
-
# Check the error log of the supplier does not contain an error
+ # This message may happen during the learning phase
regex = re.compile("must not be overwritten \(set replication log for additional
info\)")
res = pattern_errorlog(topology.master.errorlog_file, regex)
- assert res != None
+
def test_ticket47490_nine(topology):
"""
diff --git a/dirsrvtests/tickets/ticket47553_single_aci_test.py
b/dirsrvtests/tickets/ticket47553_single_aci_test.py
index 87f8bb3..cb62ee1 100644
--- a/dirsrvtests/tickets/ticket47553_single_aci_test.py
+++ b/dirsrvtests/tickets/ticket47553_single_aci_test.py
@@ -62,7 +62,7 @@ class TopologyMaster1Master2(object):
self.master2 = master2
-#(a)pytest.fixture(scope="module")
+(a)pytest.fixture(scope="module")
def topology(request):
'''
This fixture is used to create a replicated topology for the 'module'.
@@ -1140,8 +1140,8 @@ def run_isolated():
'''
global installation1_prefix
global installation2_prefix
- installation1_prefix = '/home/tbordaz/install'
- installation2_prefix = '/home/tbordaz/install'
+ installation1_prefix = None
+ installation2_prefix = None
topo = topology(True)
topo.master1.log.info("\n\n######################### Ticket 47553
######################\n")
diff --git a/dirsrvtests/tickets/ticket47619_test.py
b/dirsrvtests/tickets/ticket47619_test.py
index c3eae8d..a8cacf3 100644
--- a/dirsrvtests/tickets/ticket47619_test.py
+++ b/dirsrvtests/tickets/ticket47619_test.py
@@ -253,8 +253,7 @@ def test_ticket47619_reindex(topology):
'''
Reindex all the attributes in ATTRIBUTES
'''
- args = {TASK_WAIT: True,
- TASK_TIMEOUT: 10}
+ args = {TASK_WAIT: True}
for attr in ATTRIBUTES:
rc = topology.master.tasks.reindex(suffix=RETROCL_SUFFIX, attrname=attr,
args=args)
assert rc == 0