| | |
| | | ! CDDL HEADER END |
| | | ! |
| | | ! Copyright 2008-2009 Sun Microsystems, Inc. |
| | | ! Portions Copyright 2013 ForgeRock AS |
| | | ! --> |
| | | <stax> |
| | | |
| | |
| | | <script> |
| | | dsdn = 'uid=user.0,ou=ldapcompare,o=clu tests,dc=example,dc=com' |
| | | </script> |
| | | |
| | | |
| | | <!--- Test Case information |
| | | #@TestMarker ldapcompare check behavior tests |
| | | #@TestName ldapcompare: comparison successful |
| | | #@TestIssue 2761 |
| | | #@TestIssue none |
| | | #@TestPurpose Verify that the operation is successful and |
| | | that the comparison is successful with |
| | | useCompareResultCode option. |
| | | #@TestPreamble none |
| | | #@TestStep Do an ldapcompare with useCompareResultCode |
| | | option. |
| | | #@TestPostamble none |
| | | #@TestResult Success if ldapcompare returns 6. |
| | | --> |
| | | <testcase name="getTestCaseName |
| | | ('ldapcompare: comparison successful with useCompareResultCode option')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'ldapcompare: comparison successful' |
| | | </message> |
| | | |
| | | <call function="'ldapCompareWithScript'"> |
| | | { |
| | | 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'dsDn' : ['postalCode:63792' , |
| | | '%s' % dsdn] , |
| | | 'useCmpRC' : 'True' , |
| | | 'expectedRC' : 6 |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned true' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | |
| | | <!--- Test Case information |
| | | #@TestMarker ldapcompare check behavior tests |
| | | #@TestName ldapcompare: comparison unsuccessful |
| | | #@TestIssue none |
| | | #@TestPurpose Verify that the operation is successful and |
| | | that the comparison is unsuccessful with |
| | | useCompareResultCode option. |
| | | #@TestPreamble none |
| | | #@TestStep Do an ldapcompare with with |
| | | useCompareResultCode option. |
| | | #@TestPostamble none |
| | | #@TestResult Success if ldapcompare returns 5. |
| | | --> |
| | | <testcase name="getTestCaseName |
| | | ('ldapcompare: comparison unsuccessful with useCompareResultCode option')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'ldapcompare: comparison unsuccessful' |
| | | </message> |
| | | |
| | | <call function="'ldapCompareWithScript'"> |
| | | { |
| | | 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'dsDn' : ['postalCode:00000' , |
| | | '%s' % dsdn] , |
| | | 'useCmpRC' : 'True' , |
| | | 'expectedRC' : 5 |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned false' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | |
| | | <!--- Test Case information |
| | | #@TestMarker ldapcompare check behavior tests |
| | | #@TestName ldapcompare: comparison successful |
| | | #@TestIssue none |
| | | #@TestPurpose Verify that the operation is successful and |
| | | that the comparison is successful. |
| | | #@TestPreamble none |
| | | #@TestStep Do an ldapcompare with correct options. |
| | | #@TestPostamble none |
| | | #@TestResult Success if ldapcompare returns 6. |
| | | #@TestResult Success if ldapcompare returns 0. |
| | | --> |
| | | <testcase name="getTestCaseName |
| | | ('ldapcompare: comparison successful')"> |
| | |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'dsDn' : ['postalCode:63792' , |
| | | '%s' % dsdn] , |
| | | 'expectedRC' : 6, |
| | | 'knownIssue' : '2761' |
| | | 'expectedRC' : 0 |
| | | } |
| | | </call> |
| | | |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned true' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | |
| | | <!--- Test Case information |
| | | #@TestMarker ldapcompare check behavior tests |
| | | #@TestName ldapcompare: comparison unsuccessful |
| | | #@TestIssue 2761 |
| | | #@TestIssue none |
| | | #@TestPurpose Verify that the operation is successful and |
| | | that the comparison is unsuccessful. |
| | | #@TestPreamble none |
| | | #@TestStep Do an ldapcompare with correct options. |
| | | #@TestPostamble none |
| | | #@TestResult Success if ldapcompare returns 5. |
| | | #@TestResult Success if ldapcompare returns 0. |
| | | --> |
| | | <testcase name="getTestCaseName |
| | | ('ldapcompare: comparison unsuccessful')"> |
| | |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'dsDn' : ['postalCode:00000' , |
| | | '%s' % dsdn] , |
| | | 'expectedRC' : 5, |
| | | 'knownIssue' : '2761' |
| | | 'expectedRC' : 0 |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned false' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | |
| | | <!--- Define default value for dn1 and dn2 --> |
| | | <script> |
| | | dn1 = 'uid=user.162,ou=ldapsearch,o=clu tests,dc=example,dc=com' |
| | | dn2 = 'uid=user.1,ou=ldapdelete,o=clu tests,dc=example,dc=com' |
| | | </script> |
| | | |
| | | |
| | | <!--- Test Case information |
| | | #@TestMarker ldapcompare check behavior tests |
| | | #@TestName ldapcompare: multiple comparison successful |
| | | #@TestIssue none |
| | | #@TestPurpose Verify that the operation is successful and |
| | | that the multiple comparison is successful. |
| | | #@TestPreamble none |
| | | #@TestStep Do an ldapcompare with correct options. |
| | | #@TestPostamble none |
| | | #@TestResult Success if ldapcompare returns 6. |
| | | --> |
| | | <testcase name="getTestCaseName |
| | | ('ldapcompare: multiple comparison successful')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'ldapcompare: multiple comparison successful' |
| | | </message> |
| | | |
| | | |
| | | <call function="'ldapCompareWithScript'"> |
| | | { |
| | | 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'dsDn' : ['st:NY' , |
| | | '%s' % dn1 , |
| | | '%s' % dn2] , |
| | | 'useCmpRC' : 'True' , |
| | | 'expectedRC' : 6 |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned true for entry uid=user.162' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned true for entry uid=user.1' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | |
| | | <!--- Test Case information |
| | | #@TestMarker ldapcompare check behavior tests |
| | | #@TestName ldapcompare: multiple comparison unsuccessful |
| | | #@TestIssue none |
| | | #@TestPurpose Verify that the operation is successful and |
| | | that the multiple comparison is unsuccessful. |
| | | #@TestPreamble none |
| | | #@TestStep Do an ldapcompare with correct options. |
| | | #@TestPostamble none |
| | | #@TestResult Success if ldapcompare returns 5. |
| | | --> |
| | | <testcase name="getTestCaseName |
| | | ('ldapcompare: multiple comparison unsuccessful')"> |
| | | |
| | | <sequence> |
| | | |
| | | <call function="'testCase_Preamble'"/> |
| | | |
| | | <message> |
| | | 'ldapcompare: multiple comparison unsuccessful' |
| | | </message> |
| | | |
| | | <call function="'ldapCompareWithScript'"> |
| | | { |
| | | 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , |
| | | 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , |
| | | 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , |
| | | 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , |
| | | 'dsDn' : ['postalCode:89759' , |
| | | '%s' % dn1 , |
| | | '%s' % dn2] , |
| | | 'useCmpRC' : 'True' , |
| | | 'expectedRC' : 5 |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | returnString = STAXResult[0][1] |
| | | </script> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned true for entry uid=user.162' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <script> |
| | | msg = 'Compare operation returned false for entry uid=user.1' |
| | | </script> |
| | | <call function="'searchString'"> |
| | | { |
| | | 'returnString' : returnString , |
| | | 'expectedString' : msg |
| | | } |
| | | </call> |
| | | |
| | | <call function="'testCase_Postamble'"/> |
| | | |
| | | </sequence> |
| | | |
| | | </testcase> |
| | | |
| | | </sequence> |
| | | |