From 3aedc75d1066565dcee7e3fa32be2971055417bd Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Wed, 26 Nov 2008 17:29:26 +0000
Subject: [PATCH] fix plugin test suite dsconfig --set --add in same command

---
 opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_uniqueness.xml |   91 +++++++++++++++++++++-
 opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_refint.xml     |  116 +++++++++++++++++++++++++---
 2 files changed, 188 insertions(+), 19 deletions(-)

diff --git a/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_refint.xml b/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_refint.xml
index acdc0a8..e672835 100755
--- a/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_refint.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_refint.xml
@@ -233,6 +233,17 @@
         'optionsString'        : '--set enabled:true',
         'expectedRC'           : 0 } 
     </call>	
+
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
      
     <call function="'testCase_Postamble'"/>
   </sequence>
@@ -273,7 +284,7 @@
     </call>	    
 
     <call function="'dsconfigGet'">
-      { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST,
+      { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST,
           'dsInstanceDn'   : DIRECTORY_INSTANCE_DN,
           'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD,
           'objectName'     : 'plugin',
@@ -361,6 +372,16 @@
         'expectedRC'         : 0 } 
     </call>	    
         
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
     
     <call function="'testCase_Postamble'"/>
   </sequence>
@@ -462,6 +483,17 @@
         'optionsString'        : '--remove attribute-type:uniquemember',
         'expectedRC'           : 0 } 
     </call>	    
+
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
     
     <!-- Delete an entry -->
     <message>'######  Delete an user entry###### '</message>
@@ -504,15 +536,26 @@
     <message>'  '</message> 
        
     <call function="'dsconfig'">
-      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
-        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+      { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
         'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
         'subcommand'          : 'set-plugin-prop' ,
-        'objectType'             : 'plugin-name' ,
-        'objectName'            : 'Referential Integrity',
-        'optionsString'          : '--add attribute-type:uniquemember',
-        'expectedRC'           : 0 } 
+        'objectType'          : 'plugin-name' ,
+        'objectName'          : 'Referential Integrity',
+        'optionsString'       : '--add attribute-type:uniquemember',
+        'expectedRC'          : 0 } 
     </call>	    
+
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
         
     <call function="'testCase_Postamble'"/>
   </sequence>
@@ -554,6 +597,17 @@
         'expectedRC'           : 0 } 
     </call>	    
 
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
+
     <!-- plugin-type attribute is not dynamic. Need to restart the server -->
     <call function="'StopDsWithScript'">
       { 'location'    : STAF_REMOTE_HOSTNAME,
@@ -613,15 +667,26 @@
     <message>'  '</message> 
        
     <call function="'dsconfig'">
-      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
-        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+      { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'        : DIRECTORY_INSTANCE_DN ,
         'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
         'subcommand'          : 'set-plugin-prop' ,
-        'objectType'             : 'plugin-name' ,
-        'objectName'            : 'Referential Integrity',
-        'optionsString'          : '--add plugin-type:postoperationdelete',
-        'expectedRC'           : 0 } 
+        'objectType'          : 'plugin-name' ,
+        'objectName'          : 'Referential Integrity',
+        'optionsString'       : '--add plugin-type:postoperationdelete',
+        'expectedRC'          : 0 } 
     </call>	    
+
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
         
     <call function="'testCase_Postamble'"/>
   </sequence>
@@ -664,7 +729,7 @@
     
     <message>'######  Set the list of attribute-type ###### '</message>
     <message>'  '</message> 
-       
+
     <call function="'dsconfig'">
       { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
         'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
@@ -672,10 +737,31 @@
         'subcommand'           : 'set-plugin-prop' ,
         'objectType'           : 'plugin-name' ,
         'objectName'           : 'Referential Integrity',
-        'optionsString'        : '--set attribute-type:uniquemember --set attribute-type:member',
+        'optionsString'        : '--set attribute-type:uniquemember',
         'expectedRC'           : 0 } 
     </call>	    
+
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'set-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'optionsString'        : '--add attribute-type:member',
+        'expectedRC'           : 0 } 
+    </call>
     
+    <message>'######  Get the Referential Integrity Plugin ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'Referential Integrity',
+        'expectedRC'           : 0 } 
+    </call>
    
     <!-- Delete an entry -->
     <message>'######  Delete an user entry###### '</message>
diff --git a/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_uniqueness.xml b/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_uniqueness.xml
index a9e5d95..1279839 100755
--- a/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_uniqueness.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/plugins/plugins_uniqueness.xml
@@ -121,6 +121,17 @@
         'optionsString'        : '--set enabled:true',
         'expectedRC'           : 0 } 
     </call>	
+
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
     
     <call function="'testCase_Postamble'"/>
   </sequence>
@@ -207,6 +218,16 @@
         'expectedRC'             : 0 } 
     </call>	        
 
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
      
     <message>'######  Add an entry containing a mail already present in the DIT ###### '</message>
     <!-- Add an entry --> 
@@ -260,6 +281,17 @@
 
     <message>'######  Set the type to mail  and telephoneNumber ###### '</message>
     <message>' '</message>        
+
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'set-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'optionsString'        : '--set type:mail',
+        'expectedRC'           : 0 } 
+    </call>
        
     <call function="'dsconfig'">
       { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
@@ -268,10 +300,20 @@
         'subcommand'           : 'set-plugin-prop' ,
         'objectType'           : 'plugin-name' ,
         'objectName'           : 'UID Unique Attribute',
-        'optionsString'        : '--set type:mail --set type:telephoneNumber',
+        'optionsString'        : '--add type:telephoneNumber',
         'expectedRC'           : 0 } 
     </call>	        
-                
+
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
      
     <message>'######  Add an entry containing a mail already present in the DIT ###### '</message>
     <!-- Add an entry --> 
@@ -406,7 +448,17 @@
         'expectedRC'           : 0 } 
     </call>	        
 
-
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
+    
     <message>'######  Add an entry containing a telephoneNumber already present in the DIT ###### '</message>
     <!-- Add an entry --> 
     <!-- the Add must be refused with the error 19 -->
@@ -514,7 +566,17 @@
         'expectedRC'           : 0 } 
     </call>	        
                 
-
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
+    
     <message>'######  Add an entry under dc=example,%s ###### ' % DIRECTORY_INSTANCE_SFX</message>
     <!-- Add an entry --> 
     <!-- the Add must be added -->    
@@ -648,6 +710,17 @@
         'expectedRC'           : 0 } 
     </call>	
 
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
+    
     <message>'######  Add an entry ###### '</message>
     <message>'-- The creation must be  accepted '</message>
     <!-- Add an entry --> 
@@ -734,6 +807,16 @@
         'expectedRC'           : 0 } 
     </call>	
   
+    <message>'######  Get the UID Unique Attributes ###### '</message>                
+    <call function="'dsconfig'">
+      { 'dsInstanceHost'       : DIRECTORY_INSTANCE_HOST,
+        'dsInstanceDn'         : DIRECTORY_INSTANCE_DN ,
+        'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
+        'subcommand'           : 'get-plugin-prop' ,
+        'objectType'           : 'plugin-name' ,
+        'objectName'           : 'UID Unique Attribute',
+        'expectedRC'           : 0 } 
+    </call>
         
     <call function="'testCase_Postamble'"/>
   </sequence>

--
Gitblit v1.10.0