浏览代码

Ticket 47668 - test: port ticket47490_test to Replica/Agreement interface (47600)

Bug Description:
	Ticket https://fedorahosted.org/389/ticket/47600 introduces new Replica/Agreement/Changelog interfaces.
	This ticket is to take into account those changes into ticket47490 test case

Fix Description:
	Call enableReplication from Replica Class.
	Call Agreement.create with properties

https://fedorahosted.org/389/ticket/47668

Reviewed by: Rich Megginson (thanks)

Platforms tested: F17 / F19 (jenkins)

Flag Day: no

Doc impact: no
Thierry bordaz (tbordaz) 12 年之前
父节点
当前提交
72520a20a2
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      dirsrvtests/tickets/ticket47490_test.py

+ 8 - 3
dirsrvtests/tickets/ticket47490_test.py

@@ -230,12 +230,17 @@ def topology(request):
         # Now prepare the Master-Consumer topology
         #
         # First Enable replication
-        master.enableReplication(suffix=SUFFIX, role="master", replicaId=REPLICAID_MASTER)
-        consumer.enableReplication(suffix=SUFFIX, role="consumer")
+        master.replica.enableReplication(suffix=SUFFIX, role=REPLICAROLE_MASTER, replicaId=REPLICAID_MASTER)
+        consumer.replica.enableReplication(suffix=SUFFIX, role=REPLICAROLE_CONSUMER)
         
         # Initialize the supplier->consumer
         
-        repl_agreement = master.agreement.create(consumer, SUFFIX, binddn=defaultProperties[REPLICATION_BIND_DN], bindpw=defaultProperties[REPLICATION_BIND_PW])
+        properties = {RA_NAME:      r'meTo_$host:$port',
+                      RA_BINDDN:    defaultProperties[REPLICATION_BIND_DN],
+                      RA_BINDPW:    defaultProperties[REPLICATION_BIND_PW],
+                      RA_METHOD:    defaultProperties[REPLICATION_BIND_METHOD],
+                      RA_TRANSPORT_PROT: defaultProperties[REPLICATION_TRANSPORT]}
+        repl_agreement = master.agreement.create(suffix=SUFFIX, host=consumer.host, port=consumer.port, properties=properties)
     
         if not repl_agreement:
             log.fatal("Fail to create a replica agreement")