From 45305ff4bdf983803925be2bdb978de955e33b3c Mon Sep 17 00:00:00 2001
From: ugaston <ugaston@localhost>
Date: Thu, 29 Nov 2007 19:07:40 +0000
Subject: [PATCH] Replication tests: fixes, enhancements + new encryption testsuite
---
opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml | 109 ++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 89 insertions(+), 20 deletions(-)
diff --git a/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml b/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
index 1e67d8e..1f13e24 100644
--- a/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
+++ b/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
@@ -40,7 +40,8 @@
<call function="'testSuite_Preamble'"/>
<import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/replication/replication_setup.xml' % (TESTS_DIR)"/>
+ file="'%s/testcases/replication/replication_setup.xml'
+ % (TESTS_DIR)"/>
<call function="'replication_setup'" />
<script>
@@ -64,7 +65,8 @@
<call function="'testCase_Preamble'"/>
<message>
- 'Replication: Total Update: Simple LDIF. Initialize server with total update'
+ 'Replication: Total Update: Simple LDIF. Initialize server with \
+ total update'
</message>
<!-- Stop "master" Directory Server -->
@@ -155,7 +157,35 @@
</sequence>
</iterate>
- <!-- Verify the synchronization of the trees among the servers in the topology -->
+ <!-- To make sure replication is working: add entry to "master"
+ server -->
+ <script>
+ listAttr = []
+ listAttr.append('objectclass:top')
+ listAttr.append('objectclass:organizationalperson')
+ listAttr.append('objectclass:inetorgperson')
+ listAttr.append('objectclass:person')
+ listAttr.append('givenname: Professor Moriarty')
+ listAttr.append('sn: Moriarty')
+ listAttr.append('cn: Professor Moriarty')
+ listAttr.append('l: London')
+ </script>
+
+ <call function="'addAnEntry'">
+ { 'location' : masterHost,
+ 'dsPath' : masterPath,
+ 'dsInstanceHost' : masterHost,
+ 'dsInstancePort' : master.getPort(),
+ 'dsInstanceDn' : master.getRootDn(),
+ 'dsInstancePswd' : master.getRootPwd(),
+ 'DNToAdd' : 'uid=pmoriarty, ou=People, o=example',
+ 'listAttributes' : listAttr,
+ 'expectedRC' : 0
+ }
+ </call>
+
+ <!-- Verify the synchronization of the trees among the servers in
+ the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, 'o=example' ]
</call>
@@ -182,15 +212,17 @@
<call function="'testCase_Preamble'"/>
<message>
- 'Replication: Total Update: Schema total update. Initialize schema with total update'
+ 'Replication: Total Update: Schema total update. \
+ Initialize schema with total update'
</message>
<script>
consumer = consumerList[0]
</script>
- <!-- Try to add entry belonging to new schema (see replication setup)
- to "consumer" server; should be rejected with error 65 (objectclass violation) -->
+ <!-- Try to add entry belonging to new schema (see replication
+ setup) to "consumer" server; should be rejected with error 65
+ (objectclass violation) -->
<call function="'addEntry'">
{ 'location' : clientHost,
'dsPath' : clientPath,
@@ -198,7 +230,8 @@
'dsInstancePort' : consumer.getPort(),
'dsInstanceDn' : consumer.getRootDn(),
'dsInstancePswd' : consumer.getRootPwd(),
- 'entryToBeAdded' : '%s/replication/testuser-1.ldif' % clientDataDir,
+ 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \
+ % clientDataDir,
'expectedRC' : 65 }
</call>
@@ -213,8 +246,11 @@
</call>
<script>
- newObjectclass = '( testobjectclass1-oid NAME \'testobjectclass-1\' SUP person MAY ( street $ testattribute-1 $ c ) X-ORIGIN \'user defined\' )'
- newAttributetype = '( testattribute1-oid NAME \'testattribute-1\' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN \'user defined\' )'
+ newObjectclass = '( testobjectclass1-oid NAME \
+ \'testobjectclass-1\' SUP person MAY ( street $ testattribute-1 $ \
+ c ) X-ORIGIN \'user defined\' )'
+ newAttributetype = '( testattribute1-oid NAME \'testattribute-1\' \
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN \'user defined\' )'
</script>
<!-- Modify schema in "master" server -->
@@ -265,15 +301,18 @@
'dsInstancePort' : consumer.getPort(),
'dsInstanceDn' : consumer.getRootDn(),
'dsInstancePswd' : consumer.getRootPwd(),
- 'entryToBeAdded' : '%s/replication/testuser-1.ldif' % clientDataDir }
+ 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \
+ % clientDataDir }
</call>
- <!-- Verify the synchronization of the schema among the servers in the topology -->
+ <!-- Verify the synchronization of the schema among the servers
+ in the topology -->
<call function="'verifySchemas'">
[ clientHost, clientPath, master, consumerList, '99-user.ldif' ]
</call>
- <!-- Verify the synchronization of the trees among the servers in the topology -->
+ <!-- Verify the synchronization of the trees among the servers in
+ the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, 'o=example' ]
</call>
@@ -304,7 +343,8 @@
<call function="'testCase_Preamble'"/>
<message>
- 'Replication: Total Update: Initialize all. Initialize all servers with total update'
+ 'Replication: Total Update: Initialize all. Initialize all servers with \
+ total update'
</message>
<!-- Stop "master" Directory Server -->
@@ -325,7 +365,7 @@
{ 'location' : masterHost,
'dsPath' : masterPath,
'dsBackEnd' : 'userRoot',
- 'dsLdifFile' : '%s/replication/Short_Example.ldif' % masterDataDir
+ 'dsLdifFile' : '%s/replication/Short_Example.ldif' % masterDataDir
}
</call>
@@ -393,23 +433,52 @@
</call>
</sequence>
</iterate>
-
- <!-- Verify the synchronization of the trees among the servers in the topology -->
+
+ <!-- To make sure replication is working: add entry to "master"
+ server -->
+ <script>
+ listAttr = []
+ listAttr.append('objectclass:top')
+ listAttr.append('objectclass:organizationalperson')
+ listAttr.append('objectclass:inetorgperson')
+ listAttr.append('objectclass:person')
+ listAttr.append('givenname: Professor Moriarty')
+ listAttr.append('sn: Moriarty')
+ listAttr.append('cn: Professor Moriarty')
+ listAttr.append('l: London')
+ </script>
+
+ <call function="'addAnEntry'">
+ { 'location' : masterHost,
+ 'dsPath' : masterPath,
+ 'dsInstanceHost' : masterHost,
+ 'dsInstancePort' : master.getPort(),
+ 'dsInstanceDn' : master.getRootDn(),
+ 'dsInstancePswd' : master.getRootPwd(),
+ 'DNToAdd' : 'uid=pmoriarty, ou=People, o=example',
+ 'listAttributes' : listAttr,
+ 'expectedRC' : 0
+ }
+ </call>
+
+ <!-- Verify the synchronization of the trees among the servers in
+ the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, 'o=example' ]
</call>
-<!--
+
<script>
- knownIssue(2425)
+ knownIssue(2633)
</script>
--->
+
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
<import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/>
+ file="'%s/testcases/replication/replication_cleanup.xml'
+ % (TESTS_DIR)"/>
<call function="'replication_cleanup'" />
<call function="'testSuite_Postamble'"/>
--
Gitblit v1.10.0