| | |
| | | |
| | | <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' |
| | | % (TESTS_DIR)"/> |
| | |
| | | #@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> |
| | |
| | | <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 --> |
| | |
| | | #@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> |
| | |
| | | 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 to "consumer" |
| | | server; should be rejected with error 65 (objectclass violation) |
| | | --> |
| | | <call function="'addEntry'"> |
| | | { 'location' : clientHost, |
| | | 'dsPath' : clientPath, |
| | |
| | | 'dsInstancePswd' : consumer.getRootPwd(), |
| | | 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \ |
| | | % clientDataDir, |
| | | 'expectedRC' : 65 } |
| | | 'expectedRC' : 65 |
| | | } |
| | | </call> |
| | | |
| | | |
| | |
| | | 'dsPath' : clientPath, |
| | | 'dsInstanceHost' : masterHost, |
| | | 'dsInstancePort' : master.getPort(), |
| | | 'replicationDnList' : ['cn=schema'] } |
| | | '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 --> |
| | |
| | | 'DNToModify' : 'cn=schema', |
| | | 'attributeName' : 'attributeTypes', |
| | | 'newAttributeValue' : newAttributetype, |
| | | 'changetype' : 'add' } |
| | | 'changetype' : 'add' |
| | | } |
| | | </call> |
| | | <call function="'modifyAnAttribute'"> |
| | | { 'dsPath' : masterPath, |
| | |
| | | 'DNToModify' : 'cn=schema', |
| | | 'attributeName' : 'objectClasses', |
| | | 'newAttributeValue' : newObjectclass, |
| | | 'changetype' : 'add' } |
| | | 'changetype' : 'add' |
| | | } |
| | | </call> |
| | | |
| | | <!-- Re-enable schema replication on "master" server, and |
| | |
| | | 'refInstancePort' : consumer.getPort(), |
| | | 'refInstanceDn' : consumer.getRootDn(), |
| | | 'refInstancePswd' : consumer.getRootPwd(), |
| | | 'replicationDnList' : ['cn=schema'] } |
| | | 'replicationDnList' : ['cn=schema'] |
| | | } |
| | | </call> |
| | | |
| | | <!-- Add entry to "consumer" server --> |
| | |
| | | 'dsInstanceDn' : consumer.getRootDn(), |
| | | 'dsInstancePswd' : consumer.getRootPwd(), |
| | | 'entryToBeAdded' : '%s/replication/testuser-1.ldif' \ |
| | | % clientDataDir } |
| | | % clientDataDir |
| | | } |
| | | </call> |
| | | |
| | | <!-- Verify the synchronization of the schema among the servers |
| | |
| | | </call> |
| | | |
| | | <script> |
| | | knownIssue(2587) |
| | | knownIssue(2599) |
| | | </script> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | |
| | | #@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' |
| | | 'Replication: Total Update: Initialize all. Initialize all \ |
| | | servers with total update' |
| | | </message> |
| | | |
| | | <!-- Stop "master" Directory Server --> |
| | |
| | | { 'location' : masterHost, |
| | | 'dsPath' : masterPath, |
| | | 'dsBackEnd' : 'userRoot', |
| | | 'dsLdifFile' : '%s/replication/Short_Example.ldif' % masterDataDir |
| | | 'dsLdifFile' : '%s/replication/Short_Example.ldif' \ |
| | | % masterDataDir |
| | | } |
| | | </call> |
| | | |
| | |
| | | [ clientHost, clientPath, master, consumerList, 'o=example' ] |
| | | </call> |
| | | |
| | | <script> |
| | | knownIssue(2633) |
| | | </script> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | </sequence> |
| | | </testcase> |