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

smaguin
07.55.2008 455abb10a96c648fda3c32b46fa2790a2eaf528b
fix dsconfig changes
1 files modified
89 ■■■■■ changed files
opendj-sdk/opends/tests/functional-tests/testcases/plugins/plugins_uniqueness.xml 89 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/plugins/plugins_uniqueness.xml
@@ -23,7 +23,7 @@
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2006-2007 Sun Microsystems, Inc.
 !      Portions Copyright 2008 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="plugins_uniqueness"/>
@@ -110,7 +110,6 @@
        'expectedRC'           : 0 } 
    </call> 
 
    <call function="'testCase_Postamble'"/>
  </sequence>
 </testcase>
@@ -183,9 +182,6 @@
  <sequence>
    <call function="'testCase_Preamble'"/>
    <message>'######  Set the type to mail  ###### '</message>
    <message>' '</message>        
       
@@ -375,9 +371,9 @@
#@TestName           Plugin uniqueness
#@TestIssue          Check the plugin ensures the uniqueness of the attributes multi  valued
#@TestPreamble       none
#@TestStep           set the type to description
#@TestStep          Check we can't add an entry with the same description as the user entry reference
#@TestStep           the attribute description is multi-valued
#@TestStep           set the type to telephoneNumber
#@TestStep           Check we can't add an entry with the same telephoneNumber as the user entry reference
#@TestStep           the attribute telephoneNumber is multi-valued
#@TestPostamble      none
#@TestResult         The test is passed if  the  creation is refused
-->  
@@ -387,7 +383,7 @@
    <call function="'testCase_Preamble'"/>
    
    <message>'######  Set the type to description ###### '</message>
    <message>'######  Set the type to telephoneNumber ###### '</message>
    <message>' '</message>        
       
    <call function="'dsconfig'">
@@ -398,12 +394,12 @@
        'subcommand'          : 'set-plugin-prop' ,
        'objectType'             : 'plugin-name' ,
        'objectName'            : 'UID Unique Attribute',
        'optionsString'          : '--set type:description',
        'optionsString'        : '--set type:telephoneNumber',
        'expectedRC'           : 0 } 
    </call>         
    <message>'######  Add an entry containing a description already present in the DIT ###### '</message>
    <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 -->
    <script>
@@ -415,7 +411,8 @@
      listAttr.append('givenname:newtestuser_uniqueness')
      listAttr.append('sn:newtestuser_uniqueness')
      listAttr.append('cn:newtestuser_uniqueness')
      listAttr.append('description:mydescription2')
      listAttr.append('telephoneNumber:1 2 3 4')
      listAttr.append('telephoneNumber:1 2 3 4 6')
    </script>
        
@@ -431,7 +428,7 @@
    </call>
         
    <message>'######  Add an entry containing a description not present in the DIT ###### '</message>
    <message>'######  Add an entry containing a telephoneNumber not present in the DIT ###### '</message>
    <!-- Add an entry --> 
    <!-- the Add must be accepted --> 
    <script>
@@ -443,7 +440,8 @@
      listAttr.append('givenname:newtestuser_uniqueness')
      listAttr.append('sn:newtestuser_uniqueness')
      listAttr.append('cn:newtestuser_uniqueness')
      listAttr.append('description:mydescription')
      listAttr.append('telephoneNumber:1 2 3 4 5')
      listAttr.append('telephoneNumber:1 2 3 4 6')
    </script>
        
@@ -505,15 +503,14 @@
        'subcommand'          : 'set-plugin-prop' ,
        'objectType'             : 'plugin-name' ,
        'objectName'            : 'UID Unique Attribute',
        'optionsString'          : '--set type:description  --set base-dn:dc=example,%s' % DIRECTORY_INSTANCE_SFX,
        'optionsString'        : '--set type:telephoneNumber  --set base-dn:dc=example,%s' % DIRECTORY_INSTANCE_SFX,
        'expectedRC'           : 0 } 
    </call>         
                
             
    <message>'######  Add an entry under dc=example,%s ###### ' % DIRECTORY_INSTANCE_SFX</message>
    <!-- Add an entry --> 
    <!-- the Add must be accepted -->
    <!-- the Add must be added -->
    <script>
      listAttr = []
      listAttr.append('objectclass:top')
@@ -521,25 +518,23 @@
      listAttr.append('objectclass:inetorgperson')
      listAttr.append('objectclass:person')
      listAttr.append('givenname:newtestuser_uniqueness')
      listAttr.append('sn:newtestuser_uniqueness')
      listAttr.append('cn:newtestuser_uniqueness')
      listAttr.append('description:mydescription2')
      listAttr.append('sn:newtestuser_uniqueness1')
      listAttr.append('cn:newtestuser_uniqueness1')
      listAttr.append('telephoneNumber:1 2 3 4')
    </script>
        
    <call function="'addAnEntry'">   
      { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST ,
         'dsInstancePort'     : DIRECTORY_INSTANCE_PORT ,
         'dsInstanceDn'       : DIRECTORY_INSTANCE_DN ,
         'dsInstancePswd'    : DIRECTORY_INSTANCE_PSWD ,    
         'DNToAdd'             : 'uid=newtestuser_uniqueness,dc=example,%s' % DIRECTORY_INSTANCE_SFX,
         'DNToAdd'            : 'uid=newtestuser_uniqueness1,dc=example,%s' % DIRECTORY_INSTANCE_SFX,
         'listAttributes'        : listAttr,
         'expectedRC'         :  0
       }
    </call>
    <message>'######  Add an entry under  %s  ###### ' % DIRECTORY_INSTANCE_SFX</message>
    <message>'######  Add an entry under dc=example,%s ###### ' % DIRECTORY_INSTANCE_SFX</message>
    <message>'this operation must be rejected because of the unique attribute conflict'</message>
    <!-- Add an entry --> 
    <!-- the Add must be refused with the error 19 -->    
    <script>
@@ -551,7 +546,34 @@
      listAttr.append('givenname:newtestuser_uniqueness')
      listAttr.append('sn:newtestuser_uniqueness')
      listAttr.append('cn:newtestuser_uniqueness')
      listAttr.append('description:mydescription2')
      listAttr.append('telephoneNumber:1 2 3 4')
    </script>
    <call function="'addAnEntry'">
      { 'dsInstanceHost'      : DIRECTORY_INSTANCE_HOST ,
         'dsInstancePort'     : DIRECTORY_INSTANCE_PORT ,
         'dsInstanceDn'       : DIRECTORY_INSTANCE_DN ,
         'dsInstancePswd'     : DIRECTORY_INSTANCE_PSWD ,
         'DNToAdd'            : 'uid=newtestuser_uniqueness,dc=example,%s' % DIRECTORY_INSTANCE_SFX,
         'listAttributes'     : listAttr,
         'expectedRC'         :  19
       }
    </call>
    <message>'######  Add an entry under  %s  ###### ' % DIRECTORY_INSTANCE_SFX</message>
    <!-- Add an entry -->
    <!-- the Add must be accepted -->
    <script>
      listAttr = []
      listAttr.append('objectclass:top')
      listAttr.append('objectclass:organizationalperson')
      listAttr.append('objectclass:inetorgperson')
      listAttr.append('objectclass:person')
      listAttr.append('givenname:newtestuser_uniqueness')
      listAttr.append('sn:newtestuser_uniqueness')
      listAttr.append('cn:newtestuser_uniqueness')
      listAttr.append('telephoneNumber:1 2 3 4')
    </script>
        
@@ -578,16 +600,22 @@
        'dsBaseDN'     :  'uid=newtestuser_uniqueness,%s' % DIRECTORY_INSTANCE_SFX,
      }
    </call>
    <call function="'DeleteEntry'">
     { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
        'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
        'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
        'dsBaseDN'         :  'uid=newtestuser_uniqueness1,dc=example,%s' % DIRECTORY_INSTANCE_SFX,
      }
    </call>
    <call function="'testCase_Postamble'"/>
  </sequence>
 </testcase>
      
<!---
#@TestMarker            Plugin uniqueness
#@TestName              Plugin uniqueness
#@TestIssue             Disable  the plugin uniqueness  with the uniqu
#@TestIssue             Disable  the plugin uniqueness
#@TestStep              Disable the plugin uniqueness
#@TestStep              Keep the default configuration ( ie, type = uid )
#@TestStep              Add an entry  containing a uid value already present in the DIT
@@ -644,6 +672,7 @@
    <!-- cleanup -->
    <message>'######  Cleanup ###### '</message>
    <message>' '</message>        
    <call function="'DeleteEntry'">
     { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
        'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
@@ -659,6 +688,7 @@
                  
                                                                                                                                                         
<!---
#@TestMarker         Plugin uniqueness
#@TestName           Plugin uniqueness
@@ -705,6 +735,7 @@
 </testcase>
           
 <call function="'testSuite_Postamble'" />
 </sequence>
 </block>