opendj-sdk/opends/tests/functional-tests/shared/data/clu/data/ldapmodify_checkbehavior.ldif
New file @@ -0,0 +1,26 @@ # 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-2007 Sun Microsystems, Inc. # dn: uid=user.1,ou=ldapmodify,o=clu tests,dc=example,dc=com changetype: modify replace: postalCode postalCode: 70000 opendj-sdk/opends/tests/functional-tests/shared/data/clu/data/ldapmodify_checkoptions.ldif
New file @@ -0,0 +1,26 @@ # 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-2007 Sun Microsystems, Inc. # dn: uid=user.0,ou=ldapmodify,o=clu tests,dc=example,dc=com changetype: modify replace: postalCode postalCode: 70000 opendj-sdk/opends/tests/functional-tests/shared/data/clu/data/ldif_mod.ldif
File was deleted opendj-sdk/opends/tests/functional-tests/testcases/clu/clu.xml
@@ -26,67 +26,62 @@ ! Portions Copyright 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="main_clu"/> <function name="main_clu"> <sequence> <block name="'clu'"> <sequence> <!--- Test Group information #@TestGroupName Clu tests #@TestGroupPurpose Test the tools commands. --> <script> CurrentTestPath['group']='clu' CurrentTestPath['group'] = 'clu' </script> <call function="'testGroup_Preamble'"/> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/clu_setup.xml' % (TESTS_DIR)"/> <call function="'clu_setup'"/> <script> testList = [] testList.append(['.','clu_setup']) testList.append(['.','clu_ldapsearch_checkoptions']) testList.append(['.','clu_ldapsearch_checkbehavior']) testList.append(['.','clu_ldapmodify_checkoptions']) testList.append(['.','clu_ldapmodify_checkbehavior']) testList.append(['.','clu_ldapcompare_checkbehavior']) testList.append(['.','clu_ldapdelete_checkbehavior']) testList.append(['.','clu_base64_checkbehavior']) testList.append(['.','clu_status_checkbehavior']) testList.append(['.','clu_cleanup']) </script> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/clu_ldapsearch_checkoptions.xml' % (TESTS_DIR)"/> <call function="'clu_ldapsearch_checkoptions'"/> <iterate var="_test" in="testList"> <sequence> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/%s/%s.xml' % (TESTS_DIR,_test[0],_test[1])"/> <call function="'%s' % _test[1]" /> </sequence> </iterate> <!---<import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/cluModify.xml' % (TESTS_DIR)"/> <call function="'main_cluModify'"/> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/cluCompare.xml' % (TESTS_DIR)"/> <call function="'main_cluCompare'"/> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/cluDelete.xml' % (TESTS_DIR)"/> <call function="'main_cluDelete'"/>--> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/cluBase64.xml' % (TESTS_DIR)"/> <call function="'main_cluBase64'"/> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/cluStatus.xml' % (TESTS_DIR)"/> <call function="'main_cluStatus'"/> <import machine="STAF_LOCAL_HOSTNAME" file="'%s/testcases/clu/clu_cleanup.xml' % (TESTS_DIR)"/> <call function="'clu_cleanup'"/> <call function="'testGroup_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/cluBase64.xml
File was deleted opendj-sdk/opends/tests/functional-tests/testcases/clu/cluCompare.xml
File was deleted opendj-sdk/opends/tests/functional-tests/testcases/clu/cluDelete.xml
File was deleted opendj-sdk/opends/tests/functional-tests/testcases/clu/cluModify.xml
File was deleted opendj-sdk/opends/tests/functional-tests/testcases/clu/cluStatus.xml
File was deleted opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_base64_checkbehavior.xml
New file @@ -0,0 +1,214 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_base64_checkbehavior"/> <function name="clu_base64_checkbehavior"> <sequence> <block name="'clu_base64_checkbehavior'"> <sequence> <!--- Test Suite information #@TestSuiteName base64 check behavior tests #@TestSuitePurpose Test the results of the base64 command. #@TestSuiteGroup base64 check behavior tests #@TestScript clu_base64_checkbehavior.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Test Case information #@TestMarker base64 check behavior tests #@TestName base64: encode option #@TestIssue none #@TestPurpose Test base64 encode option. #@TestPreamble none #@TestStep Do an base64 with encode option. #@TestPostamble none #@TestResult Success if base64 returns 0. --> <testcase name="getTestCaseName('base64: encode option')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'base64: encode option' </message> <call function="'Base64WithScript'"> { 'subcommand' : 'encode', 'rawData' : 'hello world' } </call> <!-- STAXResult is not always a list--> <script> try: RC,Result=STAXResult[0] except AttributeError,details: Result='AttributeError: can not parse STAXResult %s' % details RC='1' </script> <script> pattern=re.compile('aGVsbG8gd29ybGQ=') </script> <if expr="pattern.match(Result)"> <sequence> <message log="1"> 'SUCCESS: RC=%s, Results %s' % (RC,Result) </message> <tcstatus result="'pass'"></tcstatus> </sequence> <else> <sequence> <message log="1" level="'Error'"> 'ERROR : RC=%s, Result=%s' % (RC,Result) </message> <tcstatus result="'fail'"></tcstatus> </sequence> </else> </if> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker base64 check behavior tests #@TestName base64: decode #@TestIssue none #@TestPurpose Test base64 decode option. #@TestPreamble none #@TestStep Do an base64 with decode option. #@TestPostamble none #@TestResult Success if base64 returns 0. --> <testcase name="getTestCaseName('base64: decode option')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'base64: decode option' </message> <call function="'Base64WithScript'"> { 'subcommand' : 'decode', 'encodedData' : 'aGVsbG8gd29ybGQ=' } </call> <!-- STAXResult is not always a list--> <script> try: RC,Result=STAXResult[0] except AttributeError,details: Result='AttributeError: can not parse STAXResult %s' % details RC='1' </script> <script> pattern=re.compile('hello world') </script> <if expr="pattern.match(Result)"> <sequence> <message log="1"> 'SUCCESS: RC=%s, Results %s' % (RC,Result) </message> <tcstatus result="'pass'"></tcstatus> </sequence> <else> <sequence> <message log="1" level="'Error'"> 'ERROR : RC=%s, Result=%s' % (RC,Result) </message> <tcstatus result="'fail'"></tcstatus> </sequence> </else> </if> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_cleanup.xml
@@ -31,27 +31,45 @@ <function name="clu_cleanup"> <function-description> Cleanup for the command line test suite </function-description> <sequence> <block name="'cleanup'"> <block name="'clu_cleanup'"> <sequence> <!--- Test Suite information #@TestSuiteName cleanup #@TestSuitePurpose Cleanup for the clu test suite. #@TestSuiteGroup clu cleanup #@TestScript clu_cleanup.xml --> <script> CurrentTestPath['group']='clu' if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <!--- Stop DS --> <block name="'Block DS Process Stop'"> <call function="'testSuite_Preamble'"/> <!--- Test Case information #@TestMarker cleanup #@TestName cleanup: stop DS #@TestIssue none #@TestPurpose Stop DS. #@TestPreamble none #@TestStep Stop DS. #@TestPostamble none #@TestResult Success if StopDsWithScript returns 0. --> <testcase name="getTestCaseName('cleanup: stop DS')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Stop DS running on port %s' % (DIRECTORY_INSTANCE_PORT) 'cleanup: stop DS running on port %s' \ % (DIRECTORY_INSTANCE_PORT) </message> <call function="'StopDsWithScript'"> @@ -63,39 +81,63 @@ 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD } </call> </sequence> </block> <!--- End Block DS Process Stop --> <!-- Remove the topology created for the test suite --> <block name="'Block Remove DS Topology'"> <sequence> <message> 'Remove DS topology created for the Test Suite' </message> <call function="'removeTopology'"/> <call function="'checkRC'"> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCase_Postamble'"/> </sequence> </block> <!-- End Block Remove DS Topology--> </testcase> <!--- Test Case information #@TestMarker cleanup #@TestName cleanup: remove DS topology #@TestIssue none #@TestPurpose Remove the topology created for the test suite. #@TestPreamble none #@TestStep Remove the topology created for the test suite. #@TestPostamble none #@TestResult Success if removeTopology returns 0. --> <testcase name="getTestCaseName('cleanup: remove DS topology')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'cleanup: remove DS topology created for the test suite' </message> <call function="'removeTopology'"/> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_ldapcompare_checkbehavior.xml
New file @@ -0,0 +1,158 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_ldapcompare_checkbehavior"/> <function name="clu_ldapcompare_checkbehavior"> <sequence> <block name="'clu_ldapcompare_checkbehavior'"> <sequence> <!--- Test Suite information #@TestSuiteName ldapcompare check behavior tests #@TestSuitePurpose Test the results of the ldapcompare command. #@TestSuiteGroup ldapcompare behavior options tests #@TestScript clu_ldapcompare_checkresults.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Define default value for dsdn --> <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 #@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. --> <testcase name="getTestCaseName ('ldapcompare: comparison successful')"> <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] , 'expectedRC' : 6 } </call> <script> knownIssue(2761) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapcompare check behavior tests #@TestName ldapcompare: comparison unsuccessful #@TestIssue 2761 #@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. --> <testcase name="getTestCaseName ('ldapcompare: comparison unsuccessful')"> <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] , 'expectedRC' : 5 } </call> <script> knownIssue(2761) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_ldapdelete_checkbehavior.xml
New file @@ -0,0 +1,161 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_ldapdelete_checkbehavior"/> <function name="clu_ldapdelete_checkbehavior"> <sequence> <block name="'clu_ldapdelete_checkbehavior'"> <sequence> <!--- Test Suite information #@TestSuiteName ldapdelete check behavior tests #@TestSuitePurpose Test the results of the ldapdelete command. #@TestSuiteGroup ldapdelete check behavior tests #@TestScript clu_ldapdelete_checkresults.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Define default value for basedn, dsfilter and dsdn --> <script> basedn = 'ou=ldapdelete,o=clu tests,dc=example,dc=com' dsfilter = 'uid=user.0' dsdn = '%s,%s' % (dsfilter , basedn) </script> <!--- Test Case information #@TestMarker ldapdelete check behavior tests #@TestName ldapdelete: delete an entry #@TestIssue none #@TestPurpose Test ldapdelete with correct options. #@TestPreamble none #@TestStep Check using ldapsearch that "uid=user.0" entry is present. #@TestStep Delete this entry using ldapdelete. #@TestStep Check using ldapsearch that this entry is no more present. #@TestPostamble none #@TestResult Success if the "uid=user.0" entry is deleted. --> <!-- Active RC check once the TDB issue will be fixed --> <testcase name="getTestCaseName('ldapdelete: delete an entry')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapdelete: delete an entry' </message> <call function="'ldapSearchWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsCountEntries' : 'True' , 'dsBaseDN' : basedn , 'dsFilter' : dsfilter , 'expectedRC' : 'noCheck' } </call> <script> returnString = STAXResult[0][1] </script> <call function="'checktestString'"> { 'returnString' : returnString , 'expectedString' : 'Total number of matching entries: 1' } </call> <call function="'ldapDeleteWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsDn' : ['%s' % dsdn] } </call> <call function="'ldapSearchWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsCountEntries' : 'True' , 'dsBaseDN' : basedn , 'dsFilter' : dsfilter , 'expectedRC' : 'noCheck' } </call> <script> returnString = STAXResult[0][1] </script> <call function="'checktestString'"> { 'returnString' : returnString , 'expectedString' : 'Total number of matching entries: 0' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_ldapmodify_checkbehavior.xml
New file @@ -0,0 +1,160 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_ldapmodify_checkbehavior"/> <function name="clu_ldapmodify_checkbehavior"> <sequence> <block name="'clu_ldapmodify_checkbehavior'"> <sequence> <!--- Test Suite information #@TestSuiteName ldapmodify check behavior tests #@TestSuitePurpose Test the results of the ldapmodify command. #@TestSuiteGroup ldapmodify check bahavior tests #@TestScript clu_ldapmodify_checkbehavior.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Define default value for basedn and dsfilename --> <script> basedn = 'ou=ldapmodify,o=clu tests,dc=example,dc=com' dsfilename = '%s/clu/data/ldapmodify_checkbehavior.ldif' \ % logsRemoteDataDir </script> <!--- Test Case information #@TestMarker ldapmodify check behavior tests #@TestName ldapmodify: change attribute value #@TestIssue none #@TestPurpose Verify that the operation is successful and that the attribute value has been modified. #@TestPreamble none #@TestStep Check that the "postCode" value for "uid=user.1" is 93520. #@TestStep Modify the "postalCode" value using ldapmodify. #@TestStep Check that the "postCode" value for "uid=user.1" is 70000. #@TestPostamble none #@TestResult Success if the "postalCode" value is 70000. --> <testcase name="getTestCaseName ('ldapmodify: change attribute value')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: change attribute value' </message> <call function="'ldapSearchWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : basedn , 'dsFilter' : 'uid=user.1' , 'dsAttributes' : 'postalCode' } </call> <script> returnString = STAXResult[0][1] </script> <call function="'checktestString'"> { 'returnString' : returnString , 'expectedString' : 'postalCode: 93520' } </call> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename } </call> <call function="'ldapSearchWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsBaseDN' : basedn , 'dsFilter' : 'uid=user.1' , 'dsAttributes' : 'postalCode' } </call> <script> returnString = STAXResult[0][1] </script> <call function="'checktestString'"> { 'returnString' : returnString , 'expectedString' : 'postalCode: 70000' } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_ldapmodify_checkoptions.xml
New file @@ -0,0 +1,661 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_ldapmodify_checkoptions"/> <function name="clu_ldapmodify_checkoptions"> <sequence> <block name="'clu_ldapmodify_checkoptions'"> <sequence> <!--- Test Suite information #@TestSuiteName ldapmodify check options tests #@TestSuitePurpose Check the ldapmodify command with common options and input/output options. #@TestSuiteGroup ldapmodify check options tests #@TestScript clu_ldapmodify_checkoptions.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Define default value for dsfilename --> <script> dsfilename = '%s/clu/data/ldapmodify_checkoptions.ldif' \ % logsRemoteDataDir </script> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: correct options #@TestIssue none #@TestPurpose Test ldapmodify with correct options. #@TestPreamble none #@TestStep Do an ldapmodify with correct options. #@TestPostamble none #@TestResult Success if ldapmodify returns 0. --> <testcase name="getTestCaseName('ldapmodify: correct options')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: correct options' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: empty hostname #@TestIssue 2619 #@TestPurpose Verify a parameter error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an empty hostname. #@TestPostamble none #@TestResult Success if ldapmodify returns 89. --> <testcase name="getTestCaseName('ldapmodify: empty hostname')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: empty hostname' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : ' ', 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename , 'expectedRC' : 89 } </call> <script> knownIssue(2619) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: invalid hostname #@TestIssue none #@TestPurpose Verify a connection error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an invalid hostname. #@TestPostamble none #@TestResult Success if ldapmodify returns 91. --> <testcase name="getTestCaseName('ldapmodify: invalid hostname')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: invalid hostname' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : 'bad_host' , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsAdd' : '' , 'dsFilename' : dsfilename , 'expectedRC' : 91 } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: invalid port (bad_port) #@TestIssue 2619 #@TestPurpose Verify a parameter error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an invalid port. #@TestPostamble none #@TestResult Success if ldapmodify returns 89. --> <testcase name="getTestCaseName ('ldapmodify: invalid port (bad_port)')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: invalid port (bad_port)' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : 'bad_port' , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename , 'expectedRC' : 89 } </call> <script> knownIssue(2619) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: invalid port (-1) #@TestIssue 2762 #@TestPurpose Verify a parameter error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an invalid port. #@TestPostamble none #@TestResult Success if ldapmodify returns 89. --> <testcase name="getTestCaseName('ldapmodify: invalid port (-1)')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: invalid port (-1)' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : -1 , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename , 'expectedRC' : 89 } </call> <script> knownIssue(2762) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: no binddn #@TestIssue none #@TestPurpose Verify an insufficient access rights error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with no binddn. #@TestPostamble none #@TestResult Success if ldapmodify returns 50. --> <testcase name="getTestCaseName('ldapmodify: no binddn')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: no binddn' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename , 'expectedRC' : 50 } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: invalid binddn #@TestIssue none #@TestPurpose Verify an invalid credentials error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an invalid binddn. #@TestPostamble none #@TestResult Success if ldapmodify returns 49. --> <testcase name="getTestCaseName('ldapmodify: invalid binddn')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: invalid binddn' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : 'cn=bad dn' , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename , 'expectedRC' : 49 } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: no password #@TestIssue 2624 #@TestPurpose Verify an inappropriate authentication error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify without a password. #@TestPostamble none #@TestResult Success if ldapmodify returns 48. --> <!-- This test is prompting for the password --> <!--- Comment out this testcase as it hangs on some platform --> <!--- <testcase name="getTestCaseName('ldapmodify: no password')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: no password' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsFilename' : dsfilename , 'expectedRC' : 48 } </call> <script> knownIssue(2624) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> --> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: invalid password #@TestIssue none #@TestPurpose Verify an invalid credentials error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an invalid password. #@TestPostamble none #@TestResult Success if ldapmodify returns 49. --> <testcase name="getTestCaseName('ldapmodify: invalid password')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: invalid password' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : 'bad_password' , 'dsFilename' : dsfilename , 'expectedRC' : 49 } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: empty filename #@TestIssue 2619 #@TestPurpose Verify a parameter error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with an empty filename. #@TestPostamble none #@TestResult Success if ldapmodify returns 89. --> <testcase name="getTestCaseName('ldapmodify: empty filename')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: empty filename' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : ' ' , 'expectedRC' : 89 } </call> <script> knownIssue(2619) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: bad filename #@TestIssue 2763 #@TestPurpose Verify a parameter error doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with a bad filename. #@TestPostamble none #@TestResult Success if ldapmodify returns 89. --> <testcase name="getTestCaseName('ldapmodify: bad filename')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: bad filename' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : 'bad' , 'expectedRC' : 89 } </call> <script> knownIssue(2763) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: #@TestIssue none #@TestPurpose Test ldapmodify . #@TestPreamble none #@TestStep Do an ldapmodify . #@TestPostamble none #@TestResult Success if ldapmodify returns . --> <testcase name="getTestCaseName('Test Case #12')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: Test Case #12' </message> <call function="'ldapModifyWithScript'"> { 'dsAdd' : 'True' , 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsFilename' : dsfilename } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: verbose option #@TestIssue none #@TestPurpose Verify a parameter doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with the verbose option. #@TestPostamble none #@TestResult Success if ldapmodify returns 0. --> <testcase name="getTestCaseName('ldapmodify: verbose option')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: verbose option' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsVerbose' : 'True', 'dsFilename' : dsfilename } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: continueOnError option #@TestIssue none #@TestPurpose Verify a parameter doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with the continueOnError option. #@TestPostamble none #@TestResult Success if ldapmodify returns 0. --> <testcase name="getTestCaseName ('ldapmodify: continueOnError option')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: continueOnError option' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsContinueOnError' : 'True', 'dsFilename' : dsfilename } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <!--- Test Case information #@TestMarker ldapmodify check options tests #@TestName ldapmodify: help option #@TestIssue none #@TestPurpose Verify a parameter doing an ldapmodify. #@TestPreamble none #@TestStep Do an ldapmodify with the help option. #@TestPostamble none #@TestResult Success if ldapmodify returns 0. --> <testcase name="getTestCaseName('ldapmodify: help option')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapmodify: help option' </message> <call function="'ldapModifyWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsHelp' : 'True', 'dsFilename' : dsfilename } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkbehavior.xml
New file @@ -0,0 +1,126 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_ldapsearch_checkbehavior"/> <function name="clu_ldapsearch_checkbehavior"> <sequence> <block name="'clu_ldapsearch_checkbehavior'"> <sequence> <!--- Test Suite information #@TestSuiteName ldapsearch check behavior tests #@TestSuitePurpose Test the results of ldapsearch command. #@TestSuiteGroup ldapsearch results options tests #@TestScript clu_ldapsearch_checkbehavior.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Define default value for dsdn --> <script> basedn = 'ou=ldapsearch,o=clu tests,dc=example,dc=com' </script> <!--- Test Case information #@TestMarker ldapsearch check behavior tests #@TestName ldapsearch: check number of entries #@TestIssue 2764 #@TestPurpose Verify that the operation is successful and the number of returned entries is correct. #@TestPreamble none #@TestStep Do an ldapsearch with countEntries option. #@TestPostamble none #@TestResult Success if the number of entries is 111. --> <testcase name="getTestCaseName ('ldapsearch: check number of entries')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapsearch: check number of entries' </message> <call function="'ldapSearchWithScript'"> { 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST , 'dsInstancePort' : DIRECTORY_INSTANCE_PORT , 'dsInstanceDn' : DIRECTORY_INSTANCE_DN , 'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD , 'dsTypesOnly' : 'True' , 'dsCountEntries' : 'True' , 'dsBaseDN' : basedn , 'dsFilter' : 'uid=user.1*' } </call> <script> returnString = STAXResult[0][1] </script> <call function="'checktestString'"> { 'returnString' : returnString , 'expectedString' : 'Total number of matching entries: 111' } </call> <script> knownIssue(2764) </script> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_ldapsearch_checkoptions.xml
@@ -705,7 +705,7 @@ <!--- Test Case information #@TestMarker ldapsearch check options tests #@TestName ldapsearch: timelimit of 1 seconds #@TestName ldapsearch: timelimit of 1 second #@TestIssue none #@TestPurpose Verify a time limit error doing an ldapsearch. #@TestPreamble none @@ -714,14 +714,14 @@ #@TestResult Success if ldapsearch returns 3. --> <testcase name="getTestCaseName ('ldapsearch: timelimit of 1 seconds')"> ('ldapsearch: timelimit of 1 second')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'ldapsearch: timelimit of 1 seconds' 'ldapsearch: timelimit of 1 second' </message> <call function="'ldapSearchWithScript'"> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_setup.xml
@@ -31,52 +31,82 @@ <function name="clu_setup"> <function-description> Setup for the command line test suite </function-description> <sequence> <block name="'setup'"> <block name="'clu_setup'"> <sequence> <!--- Test Suite information #@TestSuiteName setup #@TestSuitePurpose Setup for the clu test suite. #@TestSuiteGroup setup #@TestScript clu_setup.xml --> <script> CurrentTestPath['group']='clu' if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <!-- Create the topology necessary to the test group/suite --> <block name="'Block Create DS Topology'"> <call function="'testSuite_Preamble'"/> <!--- Test Case information #@TestMarker setup #@TestName setup: create DS topology #@TestIssue none #@TestPurpose Create the topology necessary to the test suite. #@TestPreamble none #@TestStep Create DS topology as described in config.py. #@TestPostamble none #@TestResult Success if createTopology returns 0. --> <testcase name="getTestCaseName('setup: create DS tpology')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Create DS topology as described in config.py' 'setup: create DS topology as described in config.py' </message> <call function="'createTopology'"> { 'initialiseInstance' : False } </call> <call function="'checkRC'"> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCase_Postamble'"/> </sequence> </block> <!--- End Block Create DS Topology --> </testcase> <!-- Load the data needed by the test suite --> <block name="'Block DS Load Data'"> <!--- Test Case information #@TestMarker setup #@TestName setup: adding initial entries #@TestIssue none #@TestPurpose Load the data needed by the test suite. #@TestPreamble none #@TestStep Load the data needed by the test suite. #@TestPostamble none #@TestResult Success if importLdif returns 0. --> <testcase name="getTestCaseName('setup: load data')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'setup: adding Initial Entries' 'setup: add initial entries' </message> <call function="'importLdif'"> @@ -85,25 +115,51 @@ } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <call function="'testCase_Postamble'"/> </sequence> </block> <!--- End Block DS Load Data --> </testcase> <!--- Start DS --> <block name="'Block DS Process Active'"> <!--- Test Case information #@TestMarker setup #@TestName setup: start DS #@TestIssue none #@TestPurpose Start DS. #@TestPreamble none #@TestStep Start DS. #@TestPostamble none #@TestResult Success if StartDsWithScript returns 0. --> <testcase name="getTestCaseName('setup: start DS')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'Start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT) 'setup: start DS to run on port %s' % (DIRECTORY_INSTANCE_PORT) </message> <!--- Start DS --> <call function="'StartDsWithScript'"> { 'location' : STAF_REMOTE_HOSTNAME } </call> <call function="'checktestRC'"> { 'returncode' : RC , 'result' : STAXResult } </call> <!--- Check that DS started --> <call function="'isAlive'"> { @@ -111,16 +167,19 @@ 'noOfMilliSeconds' : 2000 } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> </block> <!--- End Block DS Process Active --> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> opendj-sdk/opends/tests/functional-tests/testcases/clu/clu_status_checkbehavior.xml
New file @@ -0,0 +1,114 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM "../../../shared/stax.dtd"> <!-- ! 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, exclude this CDDL HEADER in each ! file and exclude 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 2007 Sun Microsystems, Inc. ! --> <stax> <defaultcall function="clu_status_checkbehavior"/> <function name="clu_status_checkbehavior"> <sequence> <block name="'clu_status_checkbehavior'"> <sequence> <!--- Test Suite information #@TestSuiteName status check behavior tests #@TestSuitePurpose Test the results of the status command. #@TestSuiteGroup status check behavior tests #@TestScript clu_status_checkbehavior.xml --> <script> if not CurrentTestPath.has_key('group'): CurrentTestPath['group'] = 'clu' CurrentTestPath['suite'] = STAXCurrentBlock </script> <call function="'testSuite_Preamble'"/> <!--- Test Case information #@TestMarker status check behavior tests #@TestName status: authenticated mode #@TestIssue none #@TestPurpose Test status in authenticated mode. #@TestPreamble none #@TestStep Do a status in authenticated mode. #@TestPostamble none #@TestResult Success if status returns 0. --> <testcase name="getTestCaseName('status: authenticated mode')"> <sequence> <call function="'testCase_Preamble'"/> <message> 'status: authenticated mode' </message> <call function="'StatusWithScript'"> { 'dsBindDN' : DIRECTORY_INSTANCE_DN , 'dsBindPwd' : DIRECTORY_INSTANCE_PSWD } </call> <!-- STAXResult is not always a list--> <script> try: RC,Result=STAXResult[0] except AttributeError,details: Result='AttributeError: can not parse STAXResult %s' % details RC='1' </script> <call function="'checktestRC'"> { 'returncode' : RC, 'result' : Result } </call> <call function="'testCase_Postamble'"/> </sequence> </testcase> <call function="'testSuite_Postamble'"/> </sequence> </block> </sequence> </function> </stax> opendj-sdk/opends/tests/shared/functions/ldap.xml
@@ -2112,9 +2112,6 @@ if dsContinueOnError: STAFCmdParamsList.append('-c') if dsReportAuthzID: STAFCmdParamsList.append('-E') if dsFilename: STAFCmdParamsList.append('-f %s' % dsFilename)