From 4f024fc2ba4b832fc537ed3fefbd96b307ecc519 Mon Sep 17 00:00:00 2001
From: ugaston <ugaston@localhost>
Date: Fri, 18 May 2007 10:53:37 +0000
Subject: [PATCH] Setting execution granularity at Suite level: Part 4

---
 opends/tests/functional-tests/testcases/aci/aci_setup.xml |  165 +++++++++++++++++++++++++++++++-----------------------
 1 files changed, 95 insertions(+), 70 deletions(-)

diff --git a/opends/tests/functional-tests/testcases/aci/aci_setup.xml b/opends/tests/functional-tests/testcases/aci/aci_setup.xml
index e4a0bca..bee1ade 100755
--- a/opends/tests/functional-tests/testcases/aci/aci_setup.xml
+++ b/opends/tests/functional-tests/testcases/aci/aci_setup.xml
@@ -36,84 +36,109 @@
       <block name="'setup'">
       
         <sequence>
-  
+
           <script>
-            CurrentTestPath['suite']=STAXCurrentBlock
+            CurrentTestPath['group']='aci'
           </script>
+						  
+				  
+		  <block name="'Block Create DS Topology'">
+		  <!-- Create the topology necessary to the test group/suite -->
+		    <sequence>
+								
+              <message>
+                 'Create DS topology as described in config.py'
+              </message>
+				  
+			  <call function="'createTopology'">
+			    { 'initialiseInstance' : True }
+			  </call>
+				    				
+			  <call function="'checkRC'">
+                  { 'returncode' : RC ,
+                    'result'     : STAXResult }
+              </call>
       
-          <call function="'testSuite_Preamble'"/>
-          
-          <!---
-                Place group-specific test information here.
-                #@TestGroupName             ACI
-                #@TestGroupPurpose          To test the ACI functionality.
-                
-                Place suite-specific test information here.
-                #@TestSuiteName             ACI Setup Tests
-                #@TestSuitePurpose          Configure OpenDS to test ACI functionality.
-                #@TestSuiteGroup            ACI Setup Tests
-                #@TestScript                aci_setup.xml
-          -->
+            </sequence>      
+          <!--- End Block Create DS Topology -->	
+          </block>				  				  
+
+
+		  <block name="'Block DS Process Active'">	  	
+          <!--- Start DS -->
+		    <sequence>
+				
+              <message>
+                 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT)
+              </message>
+  
+              <!--- Start DS -->
+              <call function="'StartDsWithScript'">
+               { 'location'  : STAF_REMOTE_HOSTNAME }
+              </call>
+  
+              <call function="'checkRC'">
+                  { 'returncode' : RC ,
+                    'result'     : STAXResult }
+              </call>
+  
+              <!--- Check that DS started -->
+              <call function="'isAlive'">
+                { 'noOfLoops'        : 5 ,
+                  'noOfMilliSeconds' : 2000 }
+              </call>			
+				
+            </sequence>
+          <!--- End Block DS Process Active -->
+          </block>			  			
+						
+
+
+		  <block name="'Block DS Load Data'">
+		  <!-- Load the data needed by the test suite -->			
+		    <sequence>
+														  				  
+              <message>
+                'ACI: ACI Setup: Adding Initial Entries'
+              </message>
     
-           <!--- Test Case : Add Entries for ACI Tests -->
-           <!---
-                Place test-specific test information here.
-                The tag, TestMarker, must be the same as the tag, TestSuiteName.
-                #@TestMarker                ACI Setup Tests
-                #@TestName                  ACI Startup Test 
-                #@TestIssue                 none
-                #@TestPurpose               Add entries that are needed for the ACI tests.
-                #@TestPreamble              none
-                #@TestStep                  Add entries with ldapmodify.
-                #@TestPostamble             none
-                #@TestResult                Success if OpenDS returns 0 for all operations
-            -->
-            <testcase name="'ACI: ACI Setup: Add Initial Entries'">
-              <sequence>
-                <call function="'testCase_Preamble'"/>
-                <message>
-                   'ACI: ACI Setup: Adding Initial Entries'
-                </message>
+              <call function="'addEntry'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                  'entryToBeAdded'   : '%s/aci/aci_startup.ldif' % STAGED_DATA_DIR }
+              </call>
     
-                <call function="'addEntry'">
-                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
-                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
-                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
-                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
-                    'entryToBeAdded'   : '%s/aci/aci_startup.ldif' % STAGED_DATA_DIR }
-                </call>
+              <call function="'checkRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+              </call>
     
-                <if expr="RC != 0">
-                    <tcstatus result="'fail'"/>
-                </if>
+              <message>
+                'ACI: ACI Setup: Enabling ACI'
+              </message>
     
-                <message>
-                   'ACI: ACI Setup: Enabling ACI'
-                </message>
+              <call function="'modifyEntry'">
+                { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
+                  'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
+                  'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
+                  'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
+                  'entryToBeModified'   : '%s/aci/aci_target/aci_handler.ldif' % STAGED_DATA_DIR }
+              </call>
     
-                <call function="'modifyEntry'">
-                  { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
-                    'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
-                    'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
-                    'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
-                    'entryToBeModified'   : '%s/aci/aci_target/aci_handler.ldif' % STAGED_DATA_DIR }
-                </call>
-    
-                <call function="'checktestRC'">
-                    { 'returncode' : RC ,
-                      'result'     : STAXResult }
-                </call>
-                
-                <call function="'testCase_Postamble'"/>
-                
-              </sequence>
-            </testcase>
-    
-            <call function="'testSuite_Postamble'"/>
-        
-          </sequence>
-        
-        </block>
+              <call function="'checkRC'">
+                { 'returncode' : RC ,
+                  'result'     : STAXResult }
+              </call>
+
+            </sequence>      
+          <!--- End Block DS Load Data -->	
+          </block>		
+							
+			        
+        </sequence>        
+      </block>
             
      </sequence>
 

--
Gitblit v1.10.0