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

el_kaboing
03.06.2007 60b8ac79d6dc15d84cc0d64b6e62006b41880c59
Added test cases for Issue 575.
2 files added
1 files modified
180 ■■■■■ changed files
opends/tests/functional-tests/shared/data/security/pwd_policy/user_add_attr.ldif 29 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/user_del_attr.ldif 28 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/testcases/security/pwd_policy/security_force_pwd_change.xml 123 ●●●●● patch | view | raw | blame | history
opends/tests/functional-tests/shared/data/security/pwd_policy/user_add_attr.ldif
New file
@@ -0,0 +1,29 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying * information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2006 Sun Microsystems, Inc.
#
dn: uid=mdog,ou=People,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com
changetype: modify
add: pager
pager: +1 999 555 1212
opends/tests/functional-tests/shared/data/security/pwd_policy/user_del_attr.ldif
New file
@@ -0,0 +1,28 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE
# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at
# trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
# add the following below this CDDL HEADER, with the fields enclosed
# by brackets "[]" replaced with your own identifying * information:
#      Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#      Portions Copyright 2006 Sun Microsystems, Inc.
#
dn: uid=mdog,ou=People,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com
changetype: modify
delete: roomnumber
opends/tests/functional-tests/testcases/security/pwd_policy/security_force_pwd_change.xml
@@ -262,10 +262,17 @@
                'entryToBeModified'   : '%s/security/pwd_policy/admin_change_user_pwd.ldif' % STAGED_DATA_DIR }
            </call>
            <if expr="RC != 0">
                <tcstatus result="'fail'"/>
            </if>
            <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult  }
            </call>
          </sequence>
        </testcase>
        <!--- Test Case : User Search With Old Pwd -->
        <testcase name="'Security: Pwd Change: Old Pwd - Search'">
          <sequence>
            <message>
               'Security: Pwd Change: User Searching With Old Password'
            </message>
@@ -280,11 +287,121 @@
                'extraParams'      : '-s base' }
            </call>
            <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult ,
                  'expected'   : 1  }
            </call>
          </sequence>
        </testcase>
        <!--- Test Case : User Add With Old Pwd -->
        <testcase name="'Security: Pwd Change: Old Pwd - Add'">
          <sequence>
            <message>
               'Security: Pwd Change: User Adding Attr With Old Password'
            </message>
            <call function="'modifyEntry'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' ,
                'dsInstancePswd'   : 'pizza' ,
                'entryToBeModified'   : '%s/security/pwd_policy/user_add_attr.ldif' % STAGED_DATA_DIR }
            </call>
            <if expr="RC != 1">
                <tcstatus result="'fail'"/>
            </if>
            <message>
               'Security: Pwd Change: Checking For Existence of User-added Attribute'
            </message>
            <call function="'compareEntry'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'attrToBeCompared'   : 'pager:+1 999 555-1212',
                'entryToBeCompared'   : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' }
            </call>
            <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult ,
                  'expected'   : 16  }
            </call>
          </sequence>
        </testcase>
     <!--- Test Case : User Delete With Old Pwd -->
        <testcase name="'Security: Pwd Change: Old Pwd - Delete'">
          <sequence>
            <message>
               'Security: Pwd Change: User Deleting Attr With Old Password'
            </message>
            <call function="'modifyEntry'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' ,
                'dsInstancePswd'   : 'pizza' ,
                'entryToBeModified'   : '%s/security/pwd_policy/user_del_attr.ldif' % STAGED_DATA_DIR }
            </call>
            <if expr="RC != 1">
                <tcstatus result="'fail'"/>
            </if>
            <message>
               'Security: Pwd Change: Checking For Existence of User-deleted Attribute'
            </message>
            <call function="'compareEntry'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : DIRECTORY_INSTANCE_DN ,
                'dsInstancePswd'   : DIRECTORY_INSTANCE_PSWD ,
                'attrToBeCompared'   : 'roomnumber:4612',
                'entryToBeCompared'   : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' }
            </call>
            <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult }
            </call>
          </sequence>
        </testcase>
     <!--- Test Case : User Delete With Old Pwd -->
        <testcase name="'Security: Pwd Change: Old Pwd - Compare'">
          <sequence>
            <message>
               'Security: Pwd Change: Checking For Existence of User Attribute'
            </message>
            <call function="'compareEntry'">
              { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
                'dsInstancePort'   : DIRECTORY_INSTANCE_PORT ,
                'dsInstanceDn'     : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' ,
                'dsInstancePswd'   : 'pizza' ,
                'attrToBeCompared'   : 'l:Sunnyvale',
                'entryToBeCompared'   : 'uid=mdog,ou=people,ou=password tests,o=Pwd Policy Tests,dc=example,dc=com' }
            </call>
            <call function="'checktestRC'">
                { 'returncode' : RC ,
                  'result'     : STAXResult ,
                  'expected'   : 1  }
            </call>
          </sequence>
        </testcase>
        <!--- Test Case : User Search With Assigned Pwd -->
        <testcase name="'Security: Pwd Change: Search With Assigned Pwd'">
          <sequence>
            <message>
               'Security: Pwd Change: User Searching With Assigned Password'
            </message>