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/functional-tests/staf-installer.xml | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/opends/tests/functional-tests/staf-installer.xml b/opends/tests/functional-tests/staf-installer.xml
index aeb6f6f..b3aab67 100644
--- a/opends/tests/functional-tests/staf-installer.xml
+++ b/opends/tests/functional-tests/staf-installer.xml
@@ -147,6 +147,12 @@
dest="${bits.download.dir}/${bits.staf.archive}" />
<property name="bits.staf.downloaded" value="true"/>
</target>
+
+ <target name="download-do-get-tomcat" unless="bits.tomcat.downloaded.before">
+ <get src="${bits.tomcat.download.url}/${bits.tomcat.archive}"
+ dest="${bits.webcontainer.download.dir}/${bits.tomcat.archive}" />
+ <property name="bits.tomcat.downloaded" value="true"/>
+ </target>
<target name="download-do-get-services" unless="bits.services.downloaded.before">
<get src="${bits.download.url}/${bits.email.archive}"
@@ -157,17 +163,21 @@
dest="${bits.download.dir}/${bits.eventmanager.archive}" />
<get src="${bits.download.url}/${bits.stax.archive}"
dest="${bits.download.dir}/${bits.stax.archive}" />
+ <get src="${bits.download.url}/${bits.http.archive}"
+ dest="${bits.download.dir}/${bits.http.archive}" />
<property name="bits.services.downloaded" value="true" />
</target>
<target name="download-do"
if="platform.supported"
- depends="status-do,download-do-prepare,download-do-get-staf,download-do-get-services">
+ depends="status-do,download-do-prepare,download-do-get-staf,download-do-get-services,download-do-get-tomcat">
<condition property="bits.all.downloaded" >
<and>
<or>
<isset property="bits.staf.downloaded"/>
<isset property="bits.staf.downloaded.before" />
+ <isset property="bits.tomcat.downloaded"/>
+ <isset property="bits.tomcat.downloaded.before" />
</or>
<or>
<isset property="bits.services.downloaded"/>
@@ -222,6 +232,15 @@
<unzip
src="${bits.download.dir}/${bits.stax.archive}"
dest="${staf.install.dir}/services"/>
+ <unzip
+ src="${bits.download.dir}/${bits.http.archive}"
+ dest="${staf.install.dir}/services"/>
+ <!-- adding dsml service extension -->
+ <mkdir dir="${staf.install.dir}/services/dsml"/>
+ <copy todir="${staf.install.dir}/services/dsml">
+ <fileset dir="${basedir}/../ext/staf" includes="dsmlService.jar"/>
+ </copy>
+
</target>
<target name="install-staf-jar"
@@ -935,7 +954,9 @@
<env key="STAF_INSTANCE_NAME" value="STAF"/>
</exec>
<echo message="Waiting for service to become available..."/>
- <waitfor>
+ <waitfor maxwait="3" maxwaitunit="minute"
+ checkevery="10" checkeveryunit="second"
+ timeoutproperty="timeout">
<socket server="${host.name}" port="${staf.port}"/>
</waitfor>
<echo message="STAF is now ready to serve requests"/>
@@ -968,7 +989,9 @@
<arg line="local shutdown shutdown"/>
</exec>
<echo message="Waiting for service to shutdown gracefully..."/>
- <waitfor>
+ <waitfor maxwait="3" maxwaitunit="minute"
+ checkevery="10" checkeveryunit="second"
+ timeoutproperty="timeoutSocketListening">
<not>
<socket server="${host.name}" port="${staf.port}"/>
</not>
@@ -1028,10 +1051,14 @@
<condition property="bits.services.downloaded.before" >
<available file="${bits.download.dir}/${bits.stax.archive}" />
</condition>
+ <condition property="bits.tomcat.downloaded.before">
+ <available file="${bits.download.dir}/${bits.tomcat.archive}"/>
+ </condition>
<condition property="bits.all.downloaded.before">
<and>
<isset property="bits.staf.downloaded.before"/>
<isset property="bits.services.downloaded.before"/>
+ <isset property="bits.tomcat.downloaded.before"/>
</and>
</condition>
<available file="${daily.package}" property="daily.package.downloaded"/>
@@ -1151,7 +1178,7 @@
<arg value="testcases/security/pwd_validator"/>
<arg value="testcases/security/sasl"/>
<arg value="testcases/security/startTLS"/>-->
- <arg value="shared/functions"/>
+ <arg value="../shared/functions"/>
<arg value="testcases/sample" />
</java>
</target>
--
Gitblit v1.10.0