From f1525316829c9189821c8c88cebfe4e688912e4f Mon Sep 17 00:00:00 2001
From: madiot <madiot@localhost>
Date: Wed, 19 Mar 2008 17:59:31 +0000
Subject: [PATCH] implement DSML functional testing for the DSML gateway. - create a tests suite's external dependency directory as "opends/tests/ext". This holds for now externally built bits used for test suites. - dsmlService : in house built STAF service extension to perform DSML result comparaison. - download tomcat webcontainer from ant similarily to other STAF bits - added plumbing to enable the STAF's DSML service and enable the STAF's HTTP service in : - functional-tests.cfg - staf-installer.xml - add create a "dsml" testcase suite - dsml_setup.xml - create instance of directory server - installs a Tomcat webcontainer - deploys DSML gateway - dsml_test.xml - use the HTTP service to post DSML SOAP requests (TESTxyz.dat) - save results as file (TESTxyz.run) and compare the results from reference results (TESTxyz.res) via the dsmlService - dsml_cleanup.xml - stop directory and tomcat server - remove directory and tomcat server - related issue tacker : https://opends.dev.java.net/issues/show_bug.cgi?id=2485 remain to do : ----------------- - SSL - configure Tomcat to support HTTPS requests to the DSML gateway. - include the dsmlService.jar source inside the code repository's refactored build env and remove the locally built dsmlService.jar from opends/tests/ext - verify potential extra work to be done for windows platform
---
opends/tests/shared/functions/dsconfig.xml | 137 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 136 insertions(+), 1 deletions(-)
diff --git a/opends/tests/shared/functions/dsconfig.xml b/opends/tests/shared/functions/dsconfig.xml
index 1cb595a..41d3883 100755
--- a/opends/tests/shared/functions/dsconfig.xml
+++ b/opends/tests/shared/functions/dsconfig.xml
@@ -1868,7 +1868,142 @@
</sequence>
</function>
-
+ <!-- Create a replication server using dsconfig -->
+ <function name="CreateBackendWithScript">
+ <!--
+
+ -->
+ <function-prolog>
+ This function creates a backend server under a given synchronization provider using dsconfig
+ </function-prolog>
+ <function-map-args>
+ <function-arg-def name="location"
+ type="optional"
+ default="STAF_REMOTE_HOSTNAME">
+ <function-arg-description>
+ Location of target host
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname" />
+ </function-arg-def>
+ <function-arg-def name="dsPath"
+ type="optional"
+ default="'%s/%s' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME)">
+ <function-arg-description>
+ Pathname to installation root
+ </function-arg-description>
+ <function-arg-property name="type" value="filepath" />
+ </function-arg-def>
+ <function-arg-def name="dsInstanceHost"
+ type="optional"
+ default="STAF_REMOTE_HOSTNAME">
+ <function-arg-description>
+ Directory server hostname or IP address
+ </function-arg-description>
+ <function-arg-property name="type" value="hostname" />
+ </function-arg-def>
+ <function-arg-def name="dsInstancePort" type="required">
+ <function-arg-description>
+ Directory server port number
+ </function-arg-description>
+ <function-arg-property name="type" value="Port number" />
+ </function-arg-def>
+ <function-arg-def name="dsInstanceDn" type="required">
+ <function-arg-description>
+ Bind DN
+ </function-arg-description>
+ <function-arg-property name="type" value="DN" />
+ </function-arg-def>
+ <function-arg-def name="dsInstancePswd" type="required">
+ <function-arg-description>
+ Bind password
+ </function-arg-description>
+ <function-arg-property name="type" value="string" />
+ </function-arg-def>
+ <function-arg-def name="dsBackendID"
+ type="optional"
+ default="DIRECTORY_INSTANCE_BE">
+ <function-arg-description>
+ Name backend
+ </function-arg-description>
+ <function-arg-property name="type" value="string" />
+ </function-arg-def>
+ <function-arg-def name="dsBaseDN"
+ type="optional"
+ default="DIRECTORY_INSTANCE_SFX">
+ <function-arg-description>
+ base dn
+ </function-arg-description>
+ <function-arg-property name="type" value="string" />
+ </function-arg-def>
+ <function-arg-def name="dsLdapDB"
+ type="optional"
+ default="'tmp'">
+ <function-arg-description>
+ back end db for based dn
+ </function-arg-description>
+ <function-arg-property name="type" value="string" />
+ </function-arg-def>
+ <function-arg-def name="dsImportTempDir"
+ type="optional"
+ default="'/tmp'">
+ <function-arg-description>
+ temporary import dir
+ </function-arg-description>
+ <function-arg-property name="type" value="string" />
+ </function-arg-def>
+ <function-arg-def name="expectedRC" type="optional" default="0">
+ <function-arg-description>
+ Expected return code value. Default value is 0.
+ Wildcard 'noCheck' to not check the RC
+ </function-arg-description>
+ </function-arg-def>
+ </function-map-args>
+ <sequence>
+ <!-- Local variables -->
+ <script>
+ mylocation=location
+ STAFCmdParams=''
+ STAFCmd=''
+ baseDNOption='--set base-dn:"%s"' % dsBaseDN
+ if dsPath:
+ dsBinPath='%s/%s' % (dsPath,fileFolder)
+ STAFCmd='%s/%s%s' % (dsBinPath,DSCONFIG,fileExt)
+
+ STAFCmdParamsList=[]
+ STAFCmdParamsList.append('create-backend')
+ #STAFCmdParamsList.append('-n')
+ #STAFCmdParamsList.append('-h %s' % dsInstanceHost)
+ #STAFCmdParamsList.append('-D %s' % dsInstanceDn)
+ #STAFCmdParamsList.append('-w %s' % dsInstancePswd)
+ #STAFCmdParamsList.append('-p %s' % dsInstancePort)
+ STAFCmdParamsList.append('--backend-name %s' % dsBackendID)
+ STAFCmdParamsList.append('--type local-db')
+ STAFCmdParamsList.append(baseDNOption)
+ STAFCmdParamsList.append('--set enabled:true')
+ STAFCmdParamsList.append('--set writability-mode:enabled')
+ STAFCmdParamsList.append('--set import-temp-directory:%s' % dsImportTempDir)
+ STAFCmdParamsList.append('--set db-directory:%s' % dsLdapDB)
+
+ </script>
+
+ <call function="'_dsconfigCommonArgs'" />
+ <script>
+ STAFCmdParams=' '.join(STAFCmdParamsList)
+ </script>
+ <call function="'runCommand'">
+ { 'name' : 'Modify dsconfig object',
+ 'location' : location,
+ 'command' : STAFCmd,
+ 'arguments' : STAFCmdParams,
+ 'expectedRC': expectedRC
+ }
+ </call>
+ <return>
+ STAXResult
+ </return>
+ </sequence>
+ </function>
+
<!-- Create a multimaster domain using dsconfig -->
<function name="createMultimasterDomain">
<function-prolog>
--
Gitblit v1.10.0