diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java b/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java index 1c0b269d4cd..f16cc864de1 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/ConfigurationAssert.java @@ -151,7 +151,7 @@ public class ConfigurationAssert for (String expected : expectedSet) { char indicator = actualSet.contains(expected)?' ':'>'; - err.printf("%s| %s",indicator,expected); + err.printf("%s| %s%n",indicator,expected); } err.flush(); Assert.fail(message.toString()); diff --git a/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java b/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java index 8ed4c5cb991..b20cc05761d 100644 --- a/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java +++ b/jetty-start/src/test/java/org/eclipse/jetty/start/TestUseCases.java @@ -56,4 +56,10 @@ public class TestUseCases { assertUseCase("home","base.jmx","assert-jmx.txt"); } + + @Test + public void testWithDatabase() throws Exception + { + assertUseCase("home","base.with.db","assert-with-db.txt"); + } } diff --git a/jetty-start/src/test/resources/usecases/assert-with-db.txt b/jetty-start/src/test/resources/usecases/assert-with-db.txt new file mode 100644 index 00000000000..165197471f4 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/assert-with-db.txt @@ -0,0 +1,31 @@ +# The XMLs we expect (order is important) +XML|${jetty.home}/etc/jetty.xml +XML|${jetty.home}/etc/jetty-http.xml +XML|${jetty.home}/etc/jetty-plus.xml +XML|${jetty.home}/etc/jetty-deploy.xml +XML|${jetty.base}/etc/jetty-db.xml + +# The LIBs we expect (order is irrelevant) +LIB|${jetty.home}/lib/jetty-http-TEST.jar +LIB|${jetty.home}/lib/jetty-io-TEST.jar +LIB|${jetty.home}/lib/jetty-schemas-3.1.jar +LIB|${jetty.home}/lib/jetty-server-TEST.jar +LIB|${jetty.home}/lib/jetty-util-TEST.jar +LIB|${jetty.home}/lib/jetty-xml-TEST.jar +LIB|${jetty.home}/lib/servlet-api-3.1.jar +LIB|${jetty.home}/lib/jetty-jndi-TEST.jar +LIB|${jetty.home}/lib/jetty-continuation-TEST.jar +LIB|${jetty.home}/lib/jndi/javax.transaction-api-1.2.jar +LIB|${jetty.home}/lib/jetty-plus-TEST.jar +LIB|${jetty.home}/lib/jetty-deploy-TEST.jar +LIB|${jetty.home}/lib/jetty-security-TEST.jar +LIB|${jetty.home}/lib/jndi/javax.activation-1.1.jar +LIB|${jetty.home}/lib/jetty-webapp-TEST.jar +LIB|${jetty.home}/lib/jetty-servlet-TEST.jar +LIB|${jetty.base}/lib/db/mysql-driver.jar +LIB|${jetty.base}/lib/db/bonecp.jar + +# The Properties we expect (order is irrelevant) +PROP|jetty.port=9090 +PROP|mysql.user=frank +PROP|mysql.pass=secret \ No newline at end of file diff --git a/jetty-start/src/test/resources/usecases/base.with.db/etc/jetty-db.xml b/jetty-start/src/test/resources/usecases/base.with.db/etc/jetty-db.xml new file mode 100644 index 00000000000..7dd6100e9d5 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.db/etc/jetty-db.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/jetty-start/src/test/resources/usecases/base.with.db/lib/db/bonecp.jar b/jetty-start/src/test/resources/usecases/base.with.db/lib/db/bonecp.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/base.with.db/lib/db/mysql-driver.jar b/jetty-start/src/test/resources/usecases/base.with.db/lib/db/mysql-driver.jar new file mode 100644 index 00000000000..e69de29bb2d diff --git a/jetty-start/src/test/resources/usecases/base.with.db/modules/db.mod b/jetty-start/src/test/resources/usecases/base.with.db/modules/db.mod new file mode 100644 index 00000000000..444d0eeeecc --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.db/modules/db.mod @@ -0,0 +1,8 @@ + +DEPEND=deploy +DEPEND=jndi +DEPEND=plus + +LIB=lib/db/*.jar + +etc/jetty-db.xml diff --git a/jetty-start/src/test/resources/usecases/base.with.db/start.ini b/jetty-start/src/test/resources/usecases/base.with.db/start.ini new file mode 100644 index 00000000000..1140dacd5a6 --- /dev/null +++ b/jetty-start/src/test/resources/usecases/base.with.db/start.ini @@ -0,0 +1,7 @@ + +--module=server,http,db + +mysql.user=frank +mysql.pass=secret + +jetty.port=9090 diff --git a/jetty-start/src/test/resources/usecases/home/modules/deploy.mod b/jetty-start/src/test/resources/usecases/home/modules/deploy.mod index 5705ac61d91..47fc62c1774 100644 --- a/jetty-start/src/test/resources/usecases/home/modules/deploy.mod +++ b/jetty-start/src/test/resources/usecases/home/modules/deploy.mod @@ -2,6 +2,8 @@ # Deploy Feature # +DEPEND=webapp + # Deploy jars LIB=lib/jetty-deploy-${jetty.version}.jar