From 40a577e4495c707dfa63a3a0dd2a879b7b470655 Mon Sep 17 00:00:00 2001
From: ugaston <ugaston@localhost>
Date: Wed, 12 Mar 2008 13:14:07 +0000
Subject: [PATCH] Do up Totalupdate test suite: update knownIssue + specification headers
---
opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml | 297 +++++++++++++++++++++++++++++++++-------------------------
1 files changed, 169 insertions(+), 128 deletions(-)
diff --git a/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml b/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
index c514178..5ce19a9 100644
--- a/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
+++ b/opends/tests/functional-tests/testcases/replication/totalupdate/totalupdate.xml
@@ -38,6 +38,18 @@
</script>
<call function="'testSuite_Preamble'"/>
+
+ <!--- Test Suite information
+ #@TestSuiteName Replication Total Update Tests
+ #@TestSuitePurpose Verify that all the contents of a given suffix
+ can be pushed in one shot from one server to
+ other servers in the topology.
+ #@TestSuiteID Total Update Tests
+ #@TestSuiteGroup Total Update
+ #@TestGroup Replication
+ #@TestScript replication_totalupdate.xml
+ #@TestHTMLLink http://opends.dev.java.net/
+ -->
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_setup.xml'
@@ -52,12 +64,20 @@
<!--- Test Case information
#@TestMarker Replication Total Update Tests
#@TestName Replication: Total Update: Simple LDIF
- #@TestID Simple LDIF
- #@TestPurpose Initialize server with total update
+ #@TestID Simple LDIF
+ #@TestPurpose Initialize server with total update
#@TestPreamble
- #@TestSteps
+ #@TestSteps Stop server A
+ #@TestSteps Import data into server A
+ #@TestSteps Start server A
+ #@TestSteps Initialise (dsreplication initialize)
+ every other server from server A
+ #@TestSteps Check suffix has been initialised on every
+ server
+ #@TestSteps Add entry on server A
#@TestPostamble
- #@TestResult
+ #@TestResult Success if initialisation call succeeds for all
+ servers and all servers are synchronised
-->
<testcase name="getTestCaseName('Simple LDIF')">
<sequence>
@@ -65,8 +85,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 -->
@@ -172,23 +192,23 @@
</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',
+ { '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 -->
+ the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, 'o=example' ]
- </call>
+ </call>
<call function="'testCase_Postamble'"/>
</sequence>
@@ -199,153 +219,177 @@
<!--- Test Case information
#@TestMarker Replication Total Update Tests
#@TestName Replication: Total Update: Schema total update
- #@TestID Schema total update
+ #@TestID Schema total update
#@TestPurpose Initialize the schema with total update.
#@TestPreamble
- #@TestSteps
+ #@TestSteps Add entry belonging to undefined new schema on
+ server B
+ #@TestSteps Disable replication for cn=schema on server A
+ #@TestSteps Add new objectClass and new attrType definition
+ to schema in server A
+ #@TestSteps Enable replication for cn=schema on server A
+ (which also initialises cn=schema)
+ #@TestSteps Add entry belonging to new schema on server B
#@TestPostamble
- #@TestResult
- -->
+ #@TestResult Success if first entry add attempt on server B
+ fails with error 65 (objectclass violation)
+ whereas second add attempt succeeds.
+ -->
<testcase name="getTestCaseName('Schema total update')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
- 'Replication: Total Update: Schema total update. \
- Initialize schema with total update'
- </message>
+ 'Replication: Total Update: Schema total update. \
+ Initialize schema with total update'
+ </message>
<script>
consumer = consumerList[0]
- </script>
+ </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 to "consumer"
+ server; should be rejected with error 65 (objectclass violation)
+ -->
<call function="'addEntry'">
- { 'location' : clientHost,
- 'dsPath' : clientPath,
- 'dsInstanceHost' : consumer.getHostname(),
- 'dsInstancePort' : consumer.getPort(),
- 'dsInstanceDn' : consumer.getRootDn(),
- 'dsInstancePswd' : consumer.getRootPwd(),
- 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \
- % clientDataDir,
- 'expectedRC' : 65 }
- </call>
+ { 'location' : clientHost,
+ 'dsPath' : clientPath,
+ 'dsInstanceHost' : consumer.getHostname(),
+ 'dsInstancePort' : consumer.getPort(),
+ 'dsInstanceDn' : consumer.getRootDn(),
+ 'dsInstancePswd' : consumer.getRootPwd(),
+ 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \
+ % clientDataDir,
+ 'expectedRC' : 65
+ }
+ </call>
<!-- Disable schema replication on "master" server -->
<call function="'disableReplication'">
- { 'location' : clientHost,
- 'dsPath' : clientPath,
- 'dsInstanceHost' : masterHost,
- 'dsInstancePort' : master.getPort(),
- 'replicationDnList' : ['cn=schema'] }
- </call>
+ { 'location' : clientHost,
+ 'dsPath' : clientPath,
+ 'dsInstanceHost' : masterHost,
+ 'dsInstancePort' : master.getPort(),
+ 'replicationDnList' : ['cn=schema']
+ }
+ </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\' )'
+ \'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 -->
<call function="'modifyAnAttribute'">
- { 'dsPath' : masterPath,
- 'dsInstanceHost' : masterHost ,
+ { 'dsPath' : masterPath,
+ 'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort(),
- 'dsInstanceDn' : master.getRootDn(),
+ 'dsInstanceDn' : master.getRootDn(),
'dsInstancePswd' : master.getRootPwd(),
- 'DNToModify' : 'cn=schema',
- 'attributeName' : 'attributeTypes',
+ 'DNToModify' : 'cn=schema',
+ 'attributeName' : 'attributeTypes',
'newAttributeValue' : newAttributetype,
- 'changetype' : 'add' }
- </call>
+ 'changetype' : 'add'
+ }
+ </call>
<call function="'modifyAnAttribute'">
- { 'dsPath' : masterPath,
- 'dsInstanceHost' : masterHost ,
+ { 'dsPath' : masterPath,
+ 'dsInstanceHost' : masterHost ,
'dsInstancePort' : master.getPort(),
- 'dsInstanceDn' : master.getRootDn(),
+ 'dsInstanceDn' : master.getRootDn(),
'dsInstancePswd' : master.getRootPwd(),
- 'DNToModify' : 'cn=schema',
- 'attributeName' : 'objectClasses',
- 'newAttributeValue' : newObjectclass,
- 'changetype' : 'add' }
- </call>
+ 'DNToModify' : 'cn=schema',
+ 'attributeName' : 'objectClasses',
+ 'newAttributeValue' : newObjectclass,
+ 'changetype' : 'add'
+ }
+ </call>
<!-- Re-enable schema replication on "master" server, and
- at the same time initialise the schema across the topology -->
+ at the same time initialise the schema across the topology -->
<call function="'enableReplication'">
- { 'location' : clientHost,
- 'dsPath' : clientPath,
- 'dsInstanceHost' : masterHost,
- 'dsInstancePort' : master.getPort(),
- 'dsInstanceDn' : master.getRootDn(),
- 'dsInstancePswd' : master.getRootPwd(),
- 'refInstanceHost' : consumer.getHostname(),
- 'refInstancePort' : consumer.getPort(),
- 'refInstanceDn' : consumer.getRootDn(),
- 'refInstancePswd' : consumer.getRootPwd(),
- 'replicationDnList' : ['cn=schema'] }
- </call>
+ { 'location' : clientHost,
+ 'dsPath' : clientPath,
+ 'dsInstanceHost' : masterHost,
+ 'dsInstancePort' : master.getPort(),
+ 'dsInstanceDn' : master.getRootDn(),
+ 'dsInstancePswd' : master.getRootPwd(),
+ 'refInstanceHost' : consumer.getHostname(),
+ 'refInstancePort' : consumer.getPort(),
+ 'refInstanceDn' : consumer.getRootDn(),
+ 'refInstancePswd' : consumer.getRootPwd(),
+ 'replicationDnList' : ['cn=schema']
+ }
+ </call>
- <!-- Add entry to "consumer" server -->
+ <!-- Add entry to "consumer" server -->
<call function="'addEntry'">
- { 'location' : clientHost,
- 'dsPath' : clientPath,
- 'dsInstanceHost' : consumer.getHostname(),
- 'dsInstancePort' : consumer.getPort(),
- 'dsInstanceDn' : consumer.getRootDn(),
- 'dsInstancePswd' : consumer.getRootPwd(),
- 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \
- % clientDataDir }
- </call>
+ { 'location' : clientHost,
+ 'dsPath' : clientPath,
+ 'dsInstanceHost' : consumer.getHostname(),
+ 'dsInstancePort' : consumer.getPort(),
+ 'dsInstanceDn' : consumer.getRootDn(),
+ 'dsInstancePswd' : consumer.getRootPwd(),
+ 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \
+ % clientDataDir
+ }
+ </call>
<!-- Verify the synchronization of the schema among the servers
- in the topology -->
+ 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 -->
+ the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, 'o=example' ]
- </call>
+ </call>
<script>
- knownIssue(2587)
- </script>
-
+ knownIssue(2599)
+ </script>
+
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
-
+
<!--- Test Case information
#@TestMarker Replication Total Update Tests
#@TestName Replication: Total Update: Initialize all
- #@TestID Initialize all
- #@TestPurpose Initialize all servers with total update
+ #@TestID Initialize all
+ #@TestPurpose Initialize all servers with total update
#@TestPreamble
- #@TestSteps
+ #@TestSteps Stop server A
+ #@TestSteps Import data into server A
+ #@TestSteps Start server A
+ #@TestSteps Initialise (dsreplication initialize all) all
+ the servers from server A
+ #@TestSteps Check suffix has been initialised on every
+ server
+ #@TestSteps Add entry on server A
#@TestPostamble
- #@TestResult
- -->
+ #@TestResult Success if initialisation call succeeds for all
+ servers and all servers are synchronised
+ -->
<testcase name="getTestCaseName('Initialize all')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
- 'Replication: Total Update: Initialize all. Initialize all servers with \
- total update'
- </message>
+ 'Replication: Total Update: Initialize all. Initialize all \
+ servers with total update'
+ </message>
<!-- Stop "master" Directory Server -->
<call function="'StopDsWithScript'">
@@ -362,10 +406,11 @@
<!-- Import data into "master" Directory Server -->
<call function="'ImportLdifWithScript'">
- { 'location' : masterHost,
- 'dsPath' : masterPath,
- 'dsBackEnd' : 'userRoot',
- 'dsLdifFile' : '%s/replication/Short_Example.ldif' % masterDataDir
+ { 'location' : masterHost,
+ 'dsPath' : masterPath,
+ 'dsBackEnd' : 'userRoot',
+ 'dsLdifFile' : '%s/replication/Short_Example.ldif' \
+ % masterDataDir
}
</call>
@@ -382,7 +427,7 @@
'uid=sholmes, ou=People, o=example']
}
</call>
-
+
<!-- Start the Directory Server -->
<call function="'StartDsWithScript'">
{ 'location' : masterHost,
@@ -403,20 +448,20 @@
}
</call>
-
+
<!-- Perform the total update -->
<call function="'initializeReplication'">
- { 'location' : clientHost,
- 'dsPath' : clientPath,
- 'sourceInstanceHost' : masterHost,
- 'sourceInstancePort' : master.getPort(),
- 'replicationDnList' : ['o=example']
+ { 'location' : clientHost,
+ 'dsPath' : clientPath,
+ 'sourceInstanceHost' : masterHost,
+ 'sourceInstancePort' : master.getPort(),
+ 'replicationDnList' : ['o=example']
}
</call>
<iterate var="server" in="consumerList">
- <sequence>
+ <sequence>
<!-- Verify the total update -->
<call function="'checkImport'">
{ 'location' : server.getHostname(),
@@ -430,7 +475,7 @@
'uid=sholmes, ou=People, o=example'],
'startDS' : 'no'
}
- </call>
+ </call>
</sequence>
</iterate>
@@ -449,32 +494,28 @@
</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',
+ { '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
+ 'expectedRC' : 0
}
</call>
-
+
<!-- Verify the synchronization of the trees among the servers in
- the topology -->
+ the topology -->
<call function="'verifyTrees'">
[ clientHost, clientPath, master, consumerList, 'o=example' ]
- </call>
-
- <script>
- knownIssue(2633)
- </script>
+ </call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
-
+
<import machine="STAF_LOCAL_HOSTNAME"
file="'%s/testcases/replication/replication_cleanup.xml'
--
Gitblit v1.10.0