Skip to Content.
Sympa Menu

notify-dpml - r1074 - in trunk/main/planet/web: . server test test/src/test/net/dpml/web/test

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1074 - in trunk/main/planet/web: . server test test/src/test/net/dpml/web/test
  • Date: Mon, 13 Feb 2006 00:29:44 +0100

Author: mcconnell
Date: 2006-02-13 00:29:43 +0100 (Mon, 13 Feb 2006)
New Revision: 1074

Removed:
trunk/main/planet/web/test/build.xml
trunk/main/planet/web/test/etc/

trunk/main/planet/web/test/src/test/net/dpml/web/test/KeystoreIntegrityTestCase.java
Modified:
trunk/main/planet/web/module.xml
trunk/main/planet/web/server/build.xml
trunk/main/planet/web/test/src/test/net/dpml/web/test/ServerTestCase.java
Log:
enable server deployment test

Modified: trunk/main/planet/web/module.xml
===================================================================
--- trunk/main/planet/web/module.xml 2006-02-12 01:32:47 UTC (rev 1073)
+++ trunk/main/planet/web/module.xml 2006-02-12 23:29:43 UTC (rev 1074)
@@ -11,7 +11,10 @@
<type id="jar"/>
<type id="part" alias="true"/>
</types>
- <dependencies>
+ <dependencies scope="BUILD">
+ <include key="dpml-web-app"/>
+ </dependencies>
+ <dependencies scope="RUNTIME">
<include ref="dpml/metro/dpml-metro-model"/>
<include ref="dpml/util/dpml-logging-api"/>
<include ref="dpml/util/dpml-configuration-api"/>
@@ -37,12 +40,10 @@
</properties>
<dependencies>
<include urn="artifact:jar:servletapi/servletapi#2.4" tag="public"/>
- <include urn="artifact:jar:jetty/jetty#6.0.0-20060131"/>
</dependencies>
</project>

- <!--
- <project name="dpml-http-test" basedir="test">
+ <project name="dpml-web-test" basedir="test">
<types>
<type id="jar"/>
</types>
@@ -50,17 +51,12 @@
<property name="project.test.fork" value="true"/>
</properties>
<dependencies scope="build">
- <include key="dpml-web-app"/>
+ <include key="dpml-web-server"/>
</dependencies>
- <dependencies>
- <include urn="artifact:jar:servletapi/servletapi#2.4" tag="public"/>
- <include urn="artifact:jar:jetty/jetty#6.0.0-20060131"/>
- </dependencies>
<dependencies scope="test">
- <include ref="dpml/metro/dpml-part-api"/>
+ <include ref="dpml/metro/dpml-metro-model"/>
<include ref="ant/ant-junit"/>
</dependencies>
</project>
- -->

</module>

Modified: trunk/main/planet/web/server/build.xml
===================================================================
--- trunk/main/planet/web/server/build.xml 2006-02-12 01:32:47 UTC (rev
1073)
+++ trunk/main/planet/web/server/build.xml 2006-02-12 23:29:43 UTC (rev
1074)
@@ -149,7 +149,7 @@
</context>
</component>
<!--
- Add an web app.
+ Add a web application.
-->
<component key="apps"
type="net.dpml.web.server.WebAppContextHandler">
<context>

Deleted: trunk/main/planet/web/test/build.xml
===================================================================
--- trunk/main/planet/web/test/build.xml 2006-02-12 01:32:47 UTC (rev
1073)
+++ trunk/main/planet/web/test/build.xml 2006-02-12 23:29:43 UTC (rev
1074)
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- * Copyright 2004-2005 Stephen J. McConnell.
- * Copyright 2004 Niclas Hedman.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.dpml.net/central/about/legal/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<project default="install"
- xmlns:transit="antlib:net.dpml.transit" xmlns:depot="dpml:depot" >
-
- <transit:import uri="local:template:dpml/tools/standard"/>
-
- <target name="init" depends="standard.init">
- <property name="war.dir" value="${basedir}/target/deliverables/wars"/>
- <depot:property feature="filename" name="project.filename" type="war"/>
- <property name="war.path" value="${war.dir}/${project.filename}"/>
- </target>
-
- <target name="prepare" depends="standard.prepare">
- <mkdir dir="target/test"/>
- <depot:property name="cached.path" feature="path" type="part"
key="dpml-web-server"/>
- <copy file="${cached.path}" toFile="target/test/demo.part"/>
- </target>
-
- <target name="package" depends="standard.package">
- <echo message="${project.filename}"/>
- <mkdir dir="${war.dir}"/>
- <war destfile="${war.path}" webxml="target/web.xml">
- <fileset dir="target/web"/>
- <classes dir="target/classes/main"/>
- </war>
- </target>
-
- <target name="install" depends="standard.install"
- description="Unpacks the war file to the root directory.">
- <mkdir dir="webapps/test"/>
- <unzip src="${war.path}" dest="webapps/test"/>
- </target>
-
-</project>

Deleted:
trunk/main/planet/web/test/src/test/net/dpml/web/test/KeystoreIntegrityTestCase.java
===================================================================
---
trunk/main/planet/web/test/src/test/net/dpml/web/test/KeystoreIntegrityTestCase.java
2006-02-12 01:32:47 UTC (rev 1073)
+++
trunk/main/planet/web/test/src/test/net/dpml/web/test/KeystoreIntegrityTestCase.java
2006-02-12 23:29:43 UTC (rev 1074)
@@ -1,59 +0,0 @@
-/*
- * Copyright 2004 Stephen J. McConnell.
- * Copyright 1999-2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.dpml.web.test;
-
-import java.io.File;
-import java.net.URI;
-import java.net.URL;
-import java.security.KeyStore;
-
-import junit.framework.TestCase;
-
-/**
- * Test integrity of the deployed keystore.
- *
- * @author <a href="mailto:dev-dpml AT lists.ibiblio.org";>The Digital Product
Meta Library</a>
- * @version $Id: AbstractDescriptorTestCase.java 1556 2005-01-22 12:43:42Z
niclas $
- */
-public class KeystoreIntegrityTestCase extends TestCase
-{
- private static final String TEST_DIR_KEY = "project.test.dir";
-
- /**
- * Test keystore loading (also validates that the installed keystore is
not corrupted).
- */
- public void testKeystore() throws Exception
- {
- KeyStore keyStore = KeyStore.getInstance( "JKS" );
- String password = "password";
- URL url = new URL( "local:keystore:dpml/planet/web/demo" );
- keyStore.load( url.openStream(), password.toCharArray() );
- }
-
- static
- {
- System.setProperty(
- "java.util.logging.config.class",
- System.getProperty(
- "java.util.logging.config.class",
- "net.dpml.transit.util.ConfigurationHandler" ) );
- System.setProperty( "java.protocol.handler.pkgs", "net.dpml.transit"
);
- }
-}

Modified:
trunk/main/planet/web/test/src/test/net/dpml/web/test/ServerTestCase.java
===================================================================
--- trunk/main/planet/web/test/src/test/net/dpml/web/test/ServerTestCase.java
2006-02-12 01:32:47 UTC (rev 1073)
+++ trunk/main/planet/web/test/src/test/net/dpml/web/test/ServerTestCase.java
2006-02-12 23:29:43 UTC (rev 1074)
@@ -19,10 +19,7 @@

package net.dpml.web.test;

-import java.io.File;
import java.net.URI;
-import java.net.URL;
-import java.security.KeyStore;

import junit.framework.TestCase;

@@ -30,11 +27,6 @@
import net.dpml.part.Component;
import net.dpml.part.ControlException;

-import org.mortbay.jetty.Server;
-import org.mortbay.jetty.Handler;
-import org.mortbay.jetty.security.Password;
-import org.mortbay.resource.Resource;
-
/**
* Test a simple component case.
*
@@ -43,28 +35,18 @@
*/
public class ServerTestCase extends TestCase
{
- private static final String PATH = "demo.part";
- private static final String TEST_DIR_KEY = "project.test.dir";
-
/**
* Test the deployment of the Jetty server.
* @exception Exception if an error occurs
*/
public void testServerDeployment() throws Exception
{
- File test = new File( System.getProperty( TEST_DIR_KEY ) );
- URI uri = new File( test, PATH ).toURI();
+ URI uri = new URI( "link:part:dpml/planet/web/dpml-web-server" );
Controller control = Controller.STANDARD;
Component component = control.createComponent( uri );
try
{
- Server server = (Server) component.getProvider().getValue( false
);
- Handler[] handlers = server.getHandlers();
- assertEquals( "handler count", 2, handlers.length );
- for( int i=0; i<handlers.length; i++ )
- {
- System.out.println( handlers[i].toString() );
- }
+ component.getProvider().getValue( false );
}
catch( ControlException e )
{
@@ -86,7 +68,7 @@
component.deactivate();
}
}
-
+
static
{
//System.setProperty( "dpml.logging.config",
"local:properties:dpml/transit/debug" );




  • r1074 - in trunk/main/planet/web: . server test test/src/test/net/dpml/web/test, mcconnell at BerliOS, 02/12/2006

Archive powered by MHonArc 2.6.24.

Top of Page