From d8199fb0e9c65fe6209824bc3bb9749e7984739c Mon Sep 17 00:00:00 2001
From: mkeyes <mkeyes@localhost>
Date: Mon, 17 Sep 2007 18:10:38 +0000
Subject: [PATCH] Added some functional tests for Issue 1830.

---
 opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_bob_pkcs12.xml     |   37 ++++++++++++
 opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml           |   40 +++++++++++++
 opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_bob_startTLS.xml |   24 ++++++++
 opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml    |   38 ++++++++++++
 4 files changed, 139 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml
index d7d2626..18c1e49 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_custom_jks.xml
@@ -218,6 +218,44 @@
             <call function="'testCase_Postamble'"/>
           </sequence>
         </testcase>
+  
+        <!--- Test Case : List propeties using dsconfig through SSL port -->
+       <!---
+            Place test-specific test information here.
+            The tag, TestMarker, be the same as the marker, TestSuiteName.
+            #@TestMarker                JKS Tests
+            #@TestName                  JKS Bob Test 6
+            #@TestIssue                 1830
+            #@TestPurpose               List properties using dsconfig.
+            #@TestPreamble              none
+            #@TestStep                  Client calls dsconfig
+                                        to list ldaps connection handler properties.
+            #@TestPostamble             none
+            #@TestResult                Success if OpenDS returns 0
+        -->
+        <testcase name="getTestCaseName('JKS - List LDAPS Conn Handler Props')">
+          <sequence>
+            <call function="'testCase_Preamble'"/>
+            <message>
+              'Security: JKS: Listing LDAPS Connection Handler Properties'
+            </message>
+            
+            <call function="'dsconfig'">
+              { 'location'       : location,
+              'dsPath'         : dsPath ,
+              'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
+              'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
+              'dsInstanceDn'   : dsInstanceDn ,
+              'dsInstancePswd' : dsInstancePswd ,
+              'subcommand'     : 'get-connection-handler-prop' ,
+              'objectType'     : 'handler-name' ,
+              'objectName'     : 'LDAPS Connection Handler',
+              'optionsString'  : '-Z -X',
+              'expectedRC'     : 0
+              }
+            </call>
+          </sequence>
+        </testcase>
 
         <import machine="STAF_LOCAL_HOSTNAME"
             file="'%s/testcases/security/jks/security_teardown_custom_jks.xml' % (TESTS_DIR)"/>
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml
index 834b64f..6e47e7b 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/jks/security_bob_jks.xml
@@ -219,6 +219,46 @@
           </sequence>
         </testcase>
 
+         <!--- Test Case : List propeties using dsconfig through SSL port -->
+       <!---
+            Place test-specific test information here.
+            The tag, TestMarker, be the same as the marker, TestSuiteName.
+            #@TestMarker                JKS Tests
+            #@TestName                  JKS Bob Test 6
+            #@TestIssue                 1830
+            #@TestPurpose               List properties using dsconfig.
+            #@TestPreamble              none
+            #@TestStep                  Client calls dsconfig
+                                        to list ldaps connection handler properties.
+            #@TestPostamble             none
+            #@TestResult                Success if OpenDS returns 0
+        -->
+        <testcase name="getTestCaseName('JKS - List LDAPS Conn Handler Props')">
+          <sequence>
+            <call function="'testCase_Preamble'"/>
+            <message>
+               'Security: JKS: Listing LDAPS Connection Handler Properties'
+            </message>
+
+            <call function="'dsconfig'">
+            { 'location'       : location,
+              'dsPath'         : dsPath ,
+              'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
+              'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
+              'dsInstanceDn'   : dsInstanceDn ,
+              'dsInstancePswd' : dsInstancePswd ,
+              'subcommand'     : 'get-connection-handler-prop' ,
+              'objectType'     : 'handler-name' ,
+              'objectName'     : 'LDAPS Connection Handler',
+              'optionsString'  : '-Z -X',
+              'expectedRC'     : 0 
+            }
+          </call>
+      
+          <call function="'testCase_Postamble'"/>
+          </sequence>
+        </testcase>
+
         <import machine="STAF_LOCAL_HOSTNAME"
             file="'%s/testcases/security/jks/security_teardown_jks.xml' % (TESTS_DIR)"/>
         <call function="'teardown_jks'" />
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_bob_pkcs12.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_bob_pkcs12.xml
index a8b3d68..10d03b2 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_bob_pkcs12.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/pkcs12/security_bob_pkcs12.xml
@@ -213,6 +213,43 @@
             <call function="'testCase_Postamble'"/>
           </sequence>
         </testcase>
+  <!--- Test Case : List propeties using dsconfig through SSL port -->
+       <!---
+            Place test-specific test information here.
+            The tag, TestMarker, be the same as the marker, TestSuiteName.
+            #@TestMarker                PKCS12 Tests
+            #@TestName                  PKCS12 Bob Test 6
+            #@TestIssue                 1830
+            #@TestPurpose               List properties using dsconfig.
+            #@TestPreamble              none
+            #@TestStep                  Client calls dsconfig
+                                        to list ldaps connection handler properties.
+            #@TestPostamble             none
+            #@TestResult                Success if OpenDS returns 0
+        -->
+        <testcase name="getTestCaseName('List LDAPS Conn Handler Props')">
+          <sequence>
+            <call function="'testCase_Preamble'"/>
+            <message>
+              'Security: PKCS12: Listing LDAPS Connection Handler Properties'
+            </message>
+            
+            <call function="'dsconfig'">
+              { 'location'       : location,
+              'dsPath'         : dsPath ,
+              'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
+              'dsInstancePort' : DIRECTORY_INSTANCE_SSL_PORT ,
+              'dsInstanceDn'   : dsInstanceDn ,
+              'dsInstancePswd' : dsInstancePswd ,
+              'subcommand'     : 'get-connection-handler-prop' ,
+              'objectType'     : 'handler-name' ,
+              'objectName'     : 'LDAPS Connection Handler',
+              'optionsString'  : '-Z -X',
+              'expectedRC'     : 0
+              }
+            </call>
+          </sequence>
+        </testcase>
 
      </sequence>
 
diff --git a/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_bob_startTLS.xml b/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_bob_startTLS.xml
index 92cdcf6..8738868 100755
--- a/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_bob_startTLS.xml
+++ b/opendj-sdk/opends/tests/functional-tests/testcases/security/startTLS/security_bob_startTLS.xml
@@ -120,6 +120,30 @@
             
           </sequence>
         </testcase>
+        
+        <testcase name="getTestCaseName('List LDAP Conn Handeler Props')">
+          <sequence>
+            <call function="'testCase_Preamble'"/>
+            <message>
+              'Security: JKS: Listing LDAPS Connection Handler Properties'
+            </message>
+            
+            <call function="'dsconfig'">
+              { 'location'       : location,
+              'dsPath'         : dsPath ,
+              'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
+              'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
+              'dsInstanceDn'   : dsInstanceDn ,
+              'dsInstancePswd' : dsInstancePswd ,
+              'subcommand'     : 'get-connection-handler-prop' ,
+              'objectType'     : 'handler-name' ,
+              'objectName'     : 'LDAP Connection Handler',
+              'optionsString'  : '-q -X',
+              'expectedRC'     : 0
+              }
+            </call>
+          </sequence>
+        </testcase>
 
      </sequence>
 

--
Gitblit v1.10.0