Add External Changelog search to replication stress tests
| | |
| | | logs.uri=file:// |
| | | tests.os.string=${os.name} |
| | | tests.jvm.string=${java.version}(${sun.arch.data.model} bits) |
| | | replication.split=false |
| | | replication.split= |
| | | replication.eclmode= |
| | |
| | | MultimasterSync = 'Multimaster Synchronization' |
| | | MultimasterType = 'multimaster' |
| | | |
| | | # Replication execution mode variables: if not defined, set random value |
| | | import random |
| | | |
| | | if REPLICATION_SPLIT_SERVERS == '': |
| | | REPLICATION_SPLIT_SERVERS = random.choice(['true', 'false']) |
| | | |
| | | if REPLICATION_ECL_MODE == '': |
| | | REPLICATION_ECL_MODE = random.choice(['opends', 'draft']) |
| | | |
| | | # Create staf objects |
| | | LOCAL_STAF_ROOT = test_env.staf(STAF_LOCAL_HOSTNAME).root |
| | | REMOTE_STAF_ROOT = test_env.staf(STAF_REMOTE_HOSTNAME).root |
| | |
| | | |
| | | |
| | | |
| | | <!-- Modify an attribute --> |
| | | <!-- Do an ldapsearch using SASL authentication --> |
| | | <function name="saslSearch"> |
| | | <function-prolog> |
| | | This function searches the Directory Server using SASL authentication |
| | |
| | | |
| | | </function> |
| | | |
| | | |
| | | |
| | | <!-- Read ECL and replay changes on stand-alone server --> |
| | | <function name="eclReadAndPlay"> |
| | | <function-prolog> |
| | | This function reads the ECL in a replicated server and replays the changes |
| | | on a stand-alone server |
| | | </function-prolog> |
| | | <function-map-args> |
| | | <function-arg-def name="location" |
| | | type="optional" |
| | | default="STAF_REMOTE_HOSTNAME"> |
| | | <function-arg-description> |
| | | Location of target host |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="hostname"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="dsPath" |
| | | type="optional" |
| | | default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)"> |
| | | <function-arg-description> |
| | | Pathname to installation root |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filepath"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="standaloneHost" |
| | | type="optional" |
| | | default="STAF_REMOTE_HOSTNAME"> |
| | | <function-arg-description> |
| | | Stand-alone directory server hostname or IP address |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="hostname"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="standalonePort" type="required"> |
| | | <function-arg-description> |
| | | Stand-alone directory server port number |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="replicaHost1" type="required"> |
| | | <function-arg-description> |
| | | Replicated Directory server hostname or IP address |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="hostname"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="replicaPort1" type="required"> |
| | | <function-arg-description> |
| | | Replicated Directory server port number |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="replicaHost2" type="required"> |
| | | <function-arg-description> |
| | | Replicated Directory server hostname or IP address |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="hostname"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="replicaPort2" type="required"> |
| | | <function-arg-description> |
| | | Replicated Directory server port number |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="Port number"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="bindDn" type="required"> |
| | | <function-arg-description> |
| | | Bind DN |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="DN"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="bindPswd" type="required"> |
| | | <function-arg-description> |
| | | Bind password |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="string"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="eclMode" type="required"> |
| | | <function-arg-description> |
| | | ECL search mode: "draft" or "opends" |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="string"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="queueSize" |
| | | type="optional" |
| | | default="1000"> |
| | | <function-arg-description> |
| | | Size of the queue where the read updates are stored for the writer to |
| | | replay on the stand-alone server |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="integer"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="displayMissingChanges" |
| | | type="optional" |
| | | default="False"> |
| | | <function-arg-description> |
| | | Whether information on missing changes should be displayed or not |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="boolean"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="outputFilename" type="required"> |
| | | <function-arg-description> |
| | | Standard output file name |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filepath"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="expectedRC" type="optional" default="0"> |
| | | <function-arg-description> |
| | | Expected return code value. Default value is 0 |
| | | Wildcard 'noCheck' to not check the RC |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="integer"/> |
| | | </function-arg-def> |
| | | <function-arg-def name="knownIssue" type="optional" default="None"> |
| | | <function-arg-description> |
| | | Known issue. Corresponds to an issue number. |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="string" /> |
| | | </function-arg-def> |
| | | </function-map-args> |
| | | <sequence> |
| | | |
| | | <!-- Local variables --> |
| | | <script> |
| | | mylocation=location |
| | | #Build the Command |
| | | STAFCmdParamsList=[] |
| | | STAFCmdParams='' |
| | | STAFCmd='EclReadAndPlay' |
| | | </script> |
| | | |
| | | <!-- Set common ldap arguments --> |
| | | <script> |
| | | STAFCmdParamsList.append('-m %s' % eclMode) |
| | | STAFCmdParamsList.append('-q %s' % queueSize) |
| | | STAFCmdParamsList.append('-D "%s"' % bindDn) |
| | | STAFCmdParamsList.append('-w "%s"' % bindPswd) |
| | | STAFCmdParamsList.append('-s %s:%s' % (standaloneHost, standalonePort)) |
| | | STAFCmdParamsList.append('-p %s:%s' % (replicaHost1, replicaPort1)) |
| | | STAFCmdParamsList.append('-p %s:%s' % (replicaHost2, replicaPort2)) |
| | | STAFCmdParamsList.append('-o %s' % outputFilename) |
| | | |
| | | if (displayMissingChanges == True): |
| | | displayMC = 'true' |
| | | else: |
| | | displayMC = 'false' |
| | | STAFCmdParamsList.append('-x %s' % displayMC) |
| | | |
| | | STAFCmdParams=' '.join(STAFCmdParamsList) |
| | | |
| | | STAFCmd='EclReadAndPlay' |
| | | </script> |
| | | <call function="'runCommand'" > |
| | | { 'name' : 'Read ECL and replay', |
| | | 'command' : '%s/bin/java' % JAVA_HOME, |
| | | 'arguments' : '%s %s' % (STAFCmd,STAFCmdParams), |
| | | 'location' : location, |
| | | 'envCmd' : ['CLASSPATH=%s/../%s/ldapjdk:%s/../%s/ldapjdk/ldapjdk.jar' \ |
| | | % (dsPath,remote.reljavadir,dsPath,remote.reljavadir)], |
| | | 'path' : '%s/../%s/ldapjdk' % (dsPath,remote.reljavadir), |
| | | 'expectedRC': expectedRC, |
| | | 'knownIssue': knownIssue |
| | | } |
| | | </call> |
| | | <return> |
| | | STAXResult |
| | | </return> |
| | | </sequence> |
| | | </function> |
| | | </stax> |
| | |
| | | <function-arg-property name="type" value="filepath"/> |
| | | </function-arg-def> |
| | | |
| | | <function-arg-def name="ignoreAttrsFile" |
| | | type="optional" |
| | | default="None"> |
| | | <function-arg-description> |
| | | File containing a list of attributes to ignore when computing the |
| | | difference |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filepath"/> |
| | | </function-arg-def> |
| | | |
| | | <function-arg-def name="overwriteExisting" type="optional" default="True"> |
| | | <function-arg-description> |
| | | Overwrite existing output file rather than append to it |
| | |
| | | if outputLdif: |
| | | STAFCmdParamsList.append('-o %s' % outputLdif) |
| | | |
| | | if ignoreAttrsFile: |
| | | STAFCmdParamsList.append('-a %s' % ignoreAttrsFile) |
| | | |
| | | if overwriteExisting: |
| | | STAFCmdParamsList.append('-O') |
| | | |
| | |
| | | <function-arg-property name="type" value="string" /> |
| | | </function-arg-def> |
| | | |
| | | <function-arg-def name="ignoreAttrsFile" |
| | | type="optional" |
| | | default="None"> |
| | | <function-arg-description> |
| | | File containing a list of attributes to ignore when computing the |
| | | difference |
| | | </function-arg-description> |
| | | <function-arg-property name="type" value="filepath"/> |
| | | </function-arg-def> |
| | | </function-list-args> |
| | | <sequence> |
| | | <script> |
| | |
| | | |
| | | <!-- Compare this tree to the reference one --> |
| | | <call function="'LdifDiffWithScript'"> |
| | | { 'location' : location, |
| | | 'dsPath' : dsPath, |
| | | 'sourceLdif' : '%s/../%s' % (dsPath, sampleTree), |
| | | 'targetLdif' : '%s/../%s' % (dsPath, referenceTree), |
| | | 'outputLdif' : '%s/../%s' % (dsPath, treeDiffs) |
| | | { 'location' : location, |
| | | 'dsPath' : dsPath, |
| | | 'sourceLdif' : '%s/../%s' % (dsPath, sampleTree), |
| | | 'targetLdif' : '%s/../%s' % (dsPath, referenceTree), |
| | | 'outputLdif' : '%s/../%s' % (dsPath, treeDiffs), |
| | | 'ignoreAttrsFile' : ignoreAttrsFile |
| | | } |
| | | </call> |
| | | <if expr="STAXResult != 0"> |
| | |
| | | 'dsInstancePswd' : otherServer.getRootPwd(), |
| | | 'dsBaseDN' : entryDn, |
| | | 'dsFilter' : 'objectclass=*', |
| | | 'dsAttributes' : 'employeeNumber', |
| | | 'logStderr' : False |
| | | } |
| | | </call> |
| | |
| | | 'issue' : myKnownIssue |
| | | } |
| | | </call> |
| | | |
| | | |
| | | <!-- Remove footprint: delete the entry just added --> |
| | | <call function="'ldapDeleteWithScript'"> |
| | | { 'location' : serverHost, |
| | | 'dsPath' : serverPath, |
| | | 'dsInstanceHost' : serverHost, |
| | | 'dsInstancePort' : server.getPort(), |
| | | 'dsInstanceDn' : server.getRootDn(), |
| | | 'dsInstancePswd' : server.getRootPwd(), |
| | | 'dsDn' : [entryDn] |
| | | } |
| | | </call> |
| | | </sequence> |
| | | </iterate> |
| | | |
| | |
| | | DIRECTORY_INSTANCE_BE = 'userRoot' |
| | | REPLICATION_CONFIG_DIR = '${tests.run.dir}/${tests.run.time}/config' |
| | | REPLICATION_SPLIT_SERVERS = '${replication.split}' |
| | | REPLICATION_ECL_MODE = '${replication.eclmode}' |
| | | JAVA_HOME = '${remote.javahome}' |
| | | LOCAL_JAVA_HOME = '${local.javahome}' |
| | | LOGS_ROOT = '${tests.run.dir}/${tests.run.time}' |
| | |
| | | |
| | | sutElementList=[] |
| | | |
| | | # Create the sut config element |
| | | sut = doc.createElement("sut") |
| | | id.appendChild(sut) |
| | | |
| | | for configType in ['REPLICATION_SPLIT_SERVERS','REPLICATION_ECL_MODE']: |
| | | |
| | | # Create the service testware element |
| | | config = doc.createElement("config") |
| | | config.setAttribute("attribute",configType) |
| | | sut.appendChild(config) |
| | | |
| | | # Create the service testware elements |
| | | sutElementList=[] |
| | | sutElementList.append(['value',eval(configType)]) |
| | | |
| | | write_text_elements(config,sutElementList) |
| | | |
| | | # Create the testware element |
| | | testware = doc.createElement("testware") |
| | | id.appendChild(testware) |
| | |
| | | </xsl:element> |
| | | </xsl:element> |
| | | |
| | | <!-- Configuration --> |
| | | <xsl:element name="h3"> |
| | | <xsl:value-of select="'Configuration Details'"/> |
| | | </xsl:element> |
| | | |
| | | <!-- Configuration Table--> |
| | | <xsl:element name="table"> |
| | | <xsl:attribute name="border"> |
| | | <xsl:value-of select="'1'"/> |
| | | </xsl:attribute> |
| | | <xsl:attribute name="cellpadding"> |
| | | <xsl:value-of select="'1'"/> |
| | | </xsl:attribute> |
| | | <xsl:element name="tr"> |
| | | <xsl:element name="th"> |
| | | <xsl:value-of select="'Attribute'"/> |
| | | </xsl:element> |
| | | <xsl:element name="th"> |
| | | <xsl:value-of select="'Value'"/> |
| | | </xsl:element> |
| | | </xsl:element> |
| | | |
| | | <xsl:for-each select="$sut/config"> |
| | | |
| | | <xsl:element name="tr"> |
| | | <xsl:element name="td"> |
| | | <xsl:element name="b"> |
| | | <xsl:value-of select="@attribute"/> |
| | | </xsl:element> |
| | | </xsl:element> |
| | | <xsl:element name="td"> |
| | | <xsl:value-of select="value"/> |
| | | </xsl:element> |
| | | </xsl:element> |
| | | |
| | | </xsl:for-each> |
| | | |
| | | </xsl:element> |
| | | |
| | | <xsl:element name="br"/> |
| | | |
| | | <!-- Package Table --> |
| | |
| | | </xsl:attribute> |
| | | </xsl:element> |
| | | |
| | | <!-- Configuration --> |
| | | <xsl:element name="h2"> |
| | | <xsl:value-of select="'Configuration Details'"/> |
| | | </xsl:element> |
| | | |
| | | <!-- Configuration Table--> |
| | | <xsl:element name="table"> |
| | | <xsl:attribute name="border"> |
| | | <xsl:value-of select="'1'"/> |
| | | </xsl:attribute> |
| | | <xsl:attribute name="cellpadding"> |
| | | <xsl:value-of select="'1'"/> |
| | | </xsl:attribute> |
| | | <xsl:element name="tr"> |
| | | <xsl:element name="th"> |
| | | <xsl:value-of select="'Attribute'"/> |
| | | </xsl:element> |
| | | <xsl:element name="th"> |
| | | <xsl:value-of select="'Value'"/> |
| | | </xsl:element> |
| | | </xsl:element> |
| | | |
| | | <xsl:for-each select="$testware/config"> |
| | | |
| | | <xsl:element name="tr"> |
| | | <xsl:element name="td"> |
| | | <xsl:element name="b"> |
| | | <xsl:value-of select="attribute"/> |
| | | </xsl:element> |
| | | </xsl:element> |
| | | <xsl:element name="td"> |
| | | <xsl:value-of select="value"/> |
| | | </xsl:element> |
| | | </xsl:element> |
| | | |
| | | </xsl:for-each> |
| | | |
| | | </xsl:element> |
| | | |
| | | <xsl:element name="br"/> |
| | | |
| | | <!-- Shaded Line --> |
| | | <xsl:element name="hr"> |
| | | <xsl:attribute name="noshade"> |
| | | <xsl:value-of select="'noshade'"/> |
| | | </xsl:attribute> |
| | | <xsl:attribute name="size"> |
| | | <xsl:value-of select="1"/> |
| | | </xsl:attribute> |
| | | </xsl:element> |
| | | |
| | | <!-- Additional Information --> |
| | | <xsl:element name="h2"> |
| | | <xsl:value-of select="'Additional Information'"/> |
| | |
| | | |
| | | if (REPLICATION_SPLIT_SERVERS == 'true'): |
| | | globalSplitServers = True |
| | | globalTestExternalChangelog = False |
| | | globalExternalChangelogMode = 'n/a' |
| | | else: |
| | | globalSplitServers = None |
| | | globalSplitServers = None |
| | | globalTestExternalChangelog = True |
| | | globalExternalChangelogMode = REPLICATION_ECL_MODE |
| | | </script> |
| | | |
| | | <message> |
| | | '***************************************************\n\ |
| | | **** REPLICATION EXECUTION MODES \n\ |
| | | **** Split Servers: %s \n\ |
| | | **** External Changelog Mode: %s \n\ |
| | | ***************************************************' % \ |
| | | (globalSplitServers, globalExternalChangelogMode) |
| | | </message> |
| | | <iterate var="__test" in="testList"> |
| | | <sequence> |
| | | |
| | |
| | | server2Dir = server2.getDir() |
| | | |
| | | suffix = 'add_del_add_del_multiple' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | 'templateLocation' : STAF_CLIENT_HOSTNAME |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | masterDir = '%s/..' % masterPath |
| | | |
| | | suffix = 'add_delete' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | server2Dir = server2.getDir() |
| | | |
| | | suffix = 'add_delete_multiple' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | 'templateLocation' : STAF_CLIENT_HOSTNAME |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | masterDir = '%s/..' % masterPath |
| | | |
| | | suffix = 'add_mod_delete' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | masterDir = '%s/..' % masterPath |
| | | |
| | | suffix = 'add_mod_delete_search' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | opt1 = '-e delayedstartup=1 -r %s -R %s' \ |
| | | % (lowRange, highRange) |
| | | opt2 = '-e esearch,random -f uid=user.XXXXXX' |
| | | opt3 = '-N %s -I 32 -v -q' % searchLoop |
| | | opt3 = '-N %s -I 32 -v -q' % ldcltLoop |
| | | opts = '%s %s %s' % (opt1, opt2, opt3) |
| | | </script> |
| | | |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | server2Dir = server2.getDir() |
| | | |
| | | suffix = 'add_modify_multiple' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | server2Dir = server2.getDir() |
| | | |
| | | suffix = 'add_search_multiple' |
| | | consumer = _topologyServerList[1] |
| | | |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | totalEntries = numberOfEntries + 2 |
| | | |
| | | suffix = 'modify' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | 'replicationDnList' : [synchroSuffix] |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Copy ldif file from "master" --> |
| | | <script> |
| | | standaloneLdifFile = '%s/%s_entries.ldif' \ |
| | | % (standaloneServer.getDir(), numberOfEntries) |
| | | </script> |
| | | <if expr="masterHost != standaloneServer.getHostname()"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : ldifFile, |
| | | 'destfile' : standaloneLdifFile, |
| | | 'remotehost' : standaloneServer.getHostname() |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | standaloneLdifFile = ldifFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Import same data imported into "master" --> |
| | | <call function="'ImportLdifWithScript'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'dsPath' : '%s/%s' % \ |
| | | (standaloneServer.getDir(), OPENDSNAME), |
| | | 'dsBackEnd' : DIRECTORY_INSTANCE_BE, |
| | | 'dsLdifFile' : standaloneLdifFile |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | % (server1Dir, numberOfEntries) |
| | | totalEntries = numberOfEntries + 2 |
| | | |
| | | suffix = 'modify_modifyrdn_multiple' |
| | | suffix = 'modify_modifyrdn_multiple' |
| | | consumer = _topologyServerList[1] |
| | | |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Copy ldif file from "master" --> |
| | | <script> |
| | | standaloneLdifFile = '%s/%s_entries.ldif' \ |
| | | % (standaloneServer.getDir(), numberOfEntries) |
| | | </script> |
| | | <if expr="masterHost != standaloneServer.getHostname()"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : ldifFile, |
| | | 'destfile' : standaloneLdifFile, |
| | | 'remotehost' : standaloneServer.getHostname() |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | standaloneLdifFile = ldifFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Import same data imported into "master" --> |
| | | <call function="'ImportLdifWithScript'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'dsPath' : '%s/%s' % \ |
| | | (standaloneServer.getDir(), OPENDSNAME), |
| | | 'dsBackEnd' : DIRECTORY_INSTANCE_BE, |
| | | 'dsLdifFile' : standaloneLdifFile |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | totalEntries = numberOfEntries + 2 |
| | | |
| | | suffix = 'modify_multiple' |
| | | consumer = _topologyServerList[1] |
| | | |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Copy ldif file from "master" --> |
| | | <script> |
| | | standaloneLdifFile = '%s/%s_entries.ldif' \ |
| | | % (standaloneServer.getDir(), numberOfEntries) |
| | | </script> |
| | | <if expr="masterHost != standaloneServer.getHostname()"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : ldifFile, |
| | | 'destfile' : standaloneLdifFile, |
| | | 'remotehost' : standaloneServer.getHostname() |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | standaloneLdifFile = ldifFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Import same data imported into "master" --> |
| | | <call function="'ImportLdifWithScript'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'dsPath' : '%s/%s' % \ |
| | | (standaloneServer.getDir(), OPENDSNAME), |
| | | 'dsBackEnd' : DIRECTORY_INSTANCE_BE, |
| | | 'dsLdifFile' : standaloneLdifFile |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | totalEntries = numberOfEntries + 2 |
| | | |
| | | suffix = 'modifyrdn' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Copy ldif file from "master" --> |
| | | <script> |
| | | standaloneLdifFile = '%s/%s_entries.ldif' \ |
| | | % (standaloneServer.getDir(), numberOfEntries) |
| | | </script> |
| | | <if expr="masterHost != standaloneServer.getHostname()"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : ldifFile, |
| | | 'destfile' : standaloneLdifFile, |
| | | 'remotehost' : standaloneServer.getHostname() |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | standaloneLdifFile = ldifFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Import same data imported into "master" --> |
| | | <call function="'ImportLdifWithScript'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'dsPath' : '%s/%s' % \ |
| | | (standaloneServer.getDir(), OPENDSNAME), |
| | | 'dsBackEnd' : DIRECTORY_INSTANCE_BE, |
| | | 'dsLdifFile' : standaloneLdifFile |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |
| | |
| | | % (server1Dir, numberOfEntries) |
| | | totalEntries = numberOfEntries + 2 |
| | | |
| | | suffix = 'modifyrdn_multiple' |
| | | suffix = 'modifyrdn_multiple' |
| | | consumer = _topologyServerList[1] |
| | | </script> |
| | | |
| | | |
| | |
| | | } |
| | | </call> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <sequence> |
| | | <message> |
| | | 'Test ECL: Install stand-alone instance whereto replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <!-- Create instance with default parameters read from |
| | | ! config.py --> |
| | | <script> |
| | | standaloneServer = Server(DIRECTORY_INSTANCE_HOST, |
| | | DIRECTORY_INSTANCE_DIR, |
| | | DIRECTORY_INSTANCE_PORT, |
| | | DIRECTORY_INSTANCE_ADMIN_PORT, |
| | | DIRECTORY_INSTANCE_SSL_PORT, |
| | | None, |
| | | DIRECTORY_INSTANCE_DN, |
| | | DIRECTORY_INSTANCE_PSWD, |
| | | synchroSuffix) |
| | | </script> |
| | | <call function="'createInstance'"> |
| | | { 'dsHost' : standaloneServer.getHostname(), |
| | | 'dsDir' : standaloneServer.getDir(), |
| | | 'dsPort' : standaloneServer.getPort(), |
| | | 'dsAdminPort' : standaloneServer.getAdminPort(), |
| | | 'dsSslPort' : standaloneServer.getSslPort(), |
| | | 'dsJmxPort' : standaloneServer.getJmxPort(), |
| | | 'dsBindDN' : standaloneServer.getRootDn(), |
| | | 'dsBindPwd' : standaloneServer.getRootPwd(), |
| | | 'dsBaseDN' : standaloneServer.getBaseDn() |
| | | } |
| | | </call> |
| | | |
| | | <!-- Copy ldif file from "master" --> |
| | | <script> |
| | | standaloneLdifFile = '%s/%s_entries.ldif' \ |
| | | % (standaloneServer.getDir(), numberOfEntries) |
| | | </script> |
| | | <if expr="masterHost != standaloneServer.getHostname()"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : ldifFile, |
| | | 'destfile' : standaloneLdifFile, |
| | | 'remotehost' : standaloneServer.getHostname() |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | standaloneLdifFile = ldifFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Import same data imported into "master" --> |
| | | <call function="'ImportLdifWithScript'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'dsPath' : '%s/%s' % \ |
| | | (standaloneServer.getDir(), OPENDSNAME), |
| | | 'dsBackEnd' : DIRECTORY_INSTANCE_BE, |
| | | 'dsLdifFile' : standaloneLdifFile |
| | | } |
| | | </call> |
| | | |
| | | <!-- Start the stand-alone Directory Server --> |
| | | <call function="'StartDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </if> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | </loop> |
| | | </sequence> |
| | | </block> |
| | | |
| | | <!-- If the External Changelog is to be tested, install an |
| | | ! stand-alone instance whereto replay the changes --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <block name="'ecl-test'"> |
| | | <sequence> |
| | | <message> |
| | | 'replication_modify: Test ECL: Read and replay \ |
| | | changes' |
| | | </message> |
| | | |
| | | <call function="'eclReadAndPlay'"> |
| | | { 'location' : standaloneServer.getHostname(), |
| | | 'standaloneHost' : standaloneServer.getHostname(), |
| | | 'standalonePort' : standaloneServer.getPort(), |
| | | 'replicaHost1' : consumer.getHostname(), |
| | | 'replicaPort1' : consumer.getPort(), |
| | | 'replicaHost2' : masterHost, |
| | | 'replicaPort2' : master.getPort(), |
| | | 'bindDn' : master.getRootDn(), |
| | | 'bindPswd' : master.getRootPwd(), |
| | | 'eclMode' : globalExternalChangelogMode, |
| | | 'queueSize' : 1000, |
| | | 'outputFilename' : '%s/eclReadAndPlay.output' \ |
| | | % standaloneServer.getDir() |
| | | } |
| | | </call> |
| | | |
| | | </sequence> |
| | | </block> |
| | | </if> |
| | | |
| | | </parallel> |
| | | <!--</sequence> |
| | | </timer> |
| | |
| | | |
| | | </testcase> |
| | | |
| | | <!-- If the External Changelog is to be tested, verify the |
| | | ! synchronisation of the tree in the stand-alone instance --> |
| | | <if expr="globalTestExternalChangelog"> |
| | | <testcase name="getTestCaseName('Verify stand-alone server tree synchronization')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'replication_modify: Verify the stand-alone server tree \ |
| | | synchronization' |
| | | </message> |
| | | |
| | | <script> |
| | | attrsToIgnoreFile = '%s/ignoreAttrsFile.ldifdiff' % \ |
| | | clientDataDir |
| | | tmpFile = '%s/ignoreAttrsFile.ldifdiff' % TMPDIR |
| | | |
| | | ignoreAttrs = [] |
| | | ignoreAttrs.append('ds-sync-generation-id') |
| | | ignoreAttrs.append('ds-sync-hist') |
| | | ignoreAttrs.append('ds-sync-state') |
| | | ignoreAttrs.append('createTimestamp') |
| | | ignoreAttrs.append('modifyTimestamp') |
| | | |
| | | # write out the ldif file |
| | | outfile = open(tmpFile,"w") |
| | | |
| | | for line in ignoreAttrs: |
| | | outfile.write("%s\n" % line) |
| | | |
| | | outfile.close() |
| | | </script> |
| | | |
| | | <if expr="clientHost != STAXServiceMachine"> |
| | | <call function="'copyFile'"> |
| | | { 'location' : masterHost, |
| | | 'srcfile' : tmpFile, |
| | | 'destfile' : attrsToIgnoreFile, |
| | | 'remotehost' : clientHost |
| | | } |
| | | </call> |
| | | <else> |
| | | <script> |
| | | attrsToIgnoreFile = tmpFile |
| | | </script> |
| | | </else> |
| | | </if> |
| | | |
| | | <!-- Verify the synchronization of the trees among the servers in |
| | | the topology --> |
| | | <call function="'verifyTrees'"> |
| | | [ clientHost, clientPath, master, [standaloneServer], |
| | | synchroSuffix, None, attrsToIgnoreFile ] |
| | | </call> |
| | | |
| | | <!-- Stop the stand-alone Directory Server --> |
| | | <call function="'StopDsWithScript'"> |
| | | { 'location' : standaloneServer.getHostname() } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | </if> |
| | | |
| | | <import machine="STAF_LOCAL_HOSTNAME" |
| | | file="'%s/../functional-tests/testcases/replication/replication_cleanup.xml' % (TESTS_DIR)"/> |