mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ludovicp
27.56.2010 a8f5d8345278d27ddf5325d3977e460b86b6275f
opends/tests/staf-tests/functional-tests/testcases/replication/encryption/encryption.xml
@@ -23,7 +23,7 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2007-2009 Sun Microsystems, Inc.
 !      Copyright 2007-2010 Sun Microsystems, Inc.
 ! -->
<stax>
@@ -97,16 +97,6 @@
                  <script>
                    serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
                    userDn = 'uid=iabizen-%s, ou=People, %s' % (i,synchroSuffix)
                    if i == 0:
                      myKnownIssue = None
                    else:
                      # if we fail to add the entry to the 'consumer' servers
                      # => it may mean that the initialize-all is not completely
                      # done yet, and so we may have come across Issue 3315
                      # (dsreplication initialize-all returns before peer
                      # has completed initialisation)
                      myKnownIssue = '3315'
                  </script>
                    
                  <!-- Add entry to one of the other servers -->
@@ -130,9 +120,7 @@
                      'dsInstanceDn'   : server.getRootDn(),
                      'dsInstancePswd' : server.getRootPwd(),
                      'DNToAdd'        : userDn,
                      'listAttributes' : listAttr,
                      'expectedRC'     : 0,
                      'knownIssue'     : myKnownIssue
                      'listAttributes' : listAttr
                    }
                  </call>
              
@@ -148,7 +136,89 @@
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          </testcase>
          <!--- Test Case information
          #@TestMarker          Replication Encryption Tests
          #@TestName            Replication: Encryption: Add entry after restart
          #@TestID              Add entry after restart
          #@TestPurpose         Check entry add over secured replication after
                                server restart
          #@TestPreamble
          #@TestSteps           Restart servers
          #@TestSteps           Add entry
          #@TestPostamble
          #@TestResult          Success if trees synchronised over the topology
          -->
          <testcase name="getTestCaseName('Add entry after restart')">
            <sequence>
              <call function="'testCase_Preamble'"/>
              <message>
                'Replication: Encryption: Add entry after restart. \
                Check entry add over secured replication after server restart'
              </message>
              <!-- Stop the servers in the topology -->
              <call function="'stopServers'">
                [_splitServerList]
              </call>
              <!-- Start the servers in the topology -->
              <call function="'startServers'">
                [_splitServerList]
              </call>
              <iterate var="server" in="_topologyServerList" indexvar="i">
                <sequence>
                  <script>
                    serverPath = '%s/%s' % (server.getDir(), OPENDSNAME)
                    userDn = 'uid=RESTART-iabizen-%s, ou=People, %s' % \
                             (i,synchroSuffix)
                  </script>
                  <!-- Add entry to one of the other servers -->
                  <script>
                    listAttr = []
                    listAttr.append('objectclass:top')
                    listAttr.append('objectclass:organizationalperson')
                    listAttr.append('objectclass:inetorgperson')
                    listAttr.append('objectclass:person')
                    listAttr.append('givenname:Izen-%s' % i)
                    listAttr.append('sn:Abizen-%s' % i)
                    listAttr.append('cn:Izen-%s Abizen-%s' % (i, i))
                    listAttr.append('l:ICNC')
                  </script>
                  <call function="'addAnEntry'">
                    { 'location'       : server.getHostname(),
                      'dsPath'         : serverPath,
                      'dsInstanceHost' : server.getHostname(),
                      'dsInstancePort' : server.getPort(),
                      'dsInstanceDn'   : server.getRootDn(),
                      'dsInstancePswd' : server.getRootPwd(),
                      'DNToAdd'        : userDn,
                      'listAttributes' : listAttr
                    }
                  </call>
                </sequence>
              </iterate>
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>
          
@@ -207,9 +277,14 @@
                          
              <!-- Verify the synchronization of the trees among the servers in 
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -269,8 +344,13 @@
                
              <!-- Verify the synchronization of the trees among the servers in 
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
         
@@ -367,9 +447,14 @@
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
                                                                           
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -467,9 +552,14 @@
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
                                                                           
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -565,9 +655,14 @@
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
                                                                           
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -666,9 +761,14 @@
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
                                                                           
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -781,9 +881,14 @@
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
                                                                           
              <call function="'testCase_Postamble'"/>
            </sequence>
@@ -883,22 +988,27 @@
              <!-- Verify the synchronization of the trees among the servers in
                the topology -->          
              <!-- If tree verification fails, we may have come across known
               !   issue #4534: Replication using security does not work after
               !   server restart
              -->
              <call function="'verifyTrees'">
                [ clientHost, clientPath, master, consumerList, synchroSuffix ]
              </call>
                [ clientHost, clientPath, master, consumerList, synchroSuffix,
                  '4534' ]
              </call>
                                                                             
              <call function="'testCase_Postamble'"/>
            </sequence>
          </testcase>                  
                                                               
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/replication/replication_cleanup.xml' 
                  % (TESTS_DIR)"/>
          <call function="'replication_cleanup'" />
          <call function="'testSuite_Postamble'"/>
                  
        </sequence>