From 490f75a1746f1e0d3a80e66b1b8c71bd8cb424ea Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 20 Oct 2011 09:16:11 +0200
Subject: [PATCH] FXOLAT-207: make the unit test simpler for developement in
 Eclipse, add a profile for PostgreSQL

---
 pom.xml                                       |  5 ++
 .../profile/mysql/olat.eclipse.properties     | 47 +++++++++++++++++++
 .../profile/postgres/olat.eclipse.properties  | 47 +++++++++++++++++++
 3 files changed, 99 insertions(+)
 create mode 100644 src/test/profile/mysql/olat.eclipse.properties
 create mode 100644 src/test/profile/postgres/olat.eclipse.properties

diff --git a/pom.xml b/pom.xml
index 67481dd6ffd..1c8ec208d0e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1322,6 +1322,11 @@
                 				<type>1</type>
                 				<location>${basedir}/target/${artifactId}-${project.version}/WEB-INF/classes/maven.build.properties</location>
                 			</linkedResource>
+                			<linkedResource>
+		                        <name>/src/test/java/olat.local.properties</name>
+		                        <type>1</type>
+		                        <location>${basedir}/src/test/profile/mysql/olat.eclipse.properties</location>
+                			</linkedResource>
 				        </linkedResources>				        
 				        
                         
diff --git a/src/test/profile/mysql/olat.eclipse.properties b/src/test/profile/mysql/olat.eclipse.properties
new file mode 100644
index 00000000000..08edf50ff96
--- /dev/null
+++ b/src/test/profile/mysql/olat.eclipse.properties
@@ -0,0 +1,47 @@
+#########################
+#
+# This olat.local.properties file is only used when running junit tests! (Unit tests run in its own classpath environment)
+# Use this file to set properties that affect or are a prerequisite for your tests.
+#
+#########################
+
+defaultlang=de
+db.show_sql=false
+
+instance.id=2
+
+generate.index.at.startup=false
+
+# for UserTest
+keepUserEmailAfterDeletion=true
+keepUserLoginAfterDeletion=true
+
+# do not run upgrades and scheduled jobs and such
+cluster.singleton.services = disabled
+jmx.rmi.port=1009
+
+# SingleVM jms.broker.url
+jms.broker.url=vm://embedded?broker.persistent=false
+search.broker.url=vm://embedded?broker.persistent=false
+codepoint.jms.broker.url=vm://embedded?broker.persistent=false
+# Cluster (remote) jms.broker.url
+#jms.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
+#search.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
+#codepoint.jms.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
+
+
+# enable/disable codepoint/breakpoint framework
+codepoint_server.enabled=true
+smtp.host=testing
+
+#
+#
+# if you like to run your tests against mysql just uncomment the following. Please do not commit it!
+#
+db.vendor=mysql
+db.name=olattest
+db.user=olat
+db.pass=olat
+db.host.port=3306
+db.database.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
+db.hibernate.ddl.auto=
diff --git a/src/test/profile/postgres/olat.eclipse.properties b/src/test/profile/postgres/olat.eclipse.properties
new file mode 100644
index 00000000000..7a7fab9939b
--- /dev/null
+++ b/src/test/profile/postgres/olat.eclipse.properties
@@ -0,0 +1,47 @@
+#########################
+#
+# This olat.local.properties file is only used when running junit tests! (Unit tests run in its own classpath environment)
+# Use this file to set properties that affect or are a prerequisite for your tests.
+#
+#########################
+
+defaultlang=de
+db.show_sql=false
+
+instance.id=2
+
+generate.index.at.startup=false
+
+# for UserTest
+keepUserEmailAfterDeletion=true
+keepUserLoginAfterDeletion=true
+
+# do not run upgrades and scheduled jobs and such
+cluster.singleton.services = disabled
+jmx.rmi.port=1009
+
+# SingleVM jms.broker.url
+jms.broker.url=vm://embedded?broker.persistent=false
+search.broker.url=vm://embedded?broker.persistent=false
+codepoint.jms.broker.url=vm://embedded?broker.persistent=false
+# Cluster (remote) jms.broker.url
+#jms.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
+#search.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
+#codepoint.jms.broker.url=failover:(tcp://localhost:${test.env.jms.broker.port}?wireFormat.maxInactivityDuration=0)
+
+
+# enable/disable codepoint/breakpoint framework
+codepoint_server.enabled=true
+smtp.host=testing
+
+#
+#
+# if you like to run your tests against mysql just uncomment the following. Please do not commit it!
+#
+db.vendor=postgresql
+db.name=olattest
+db.user=postgres
+db.pass=postgres
+db.host.port=5432
+db.database.dialect=org.hibernate.dialect.PostgreSQLDialect
+db.hibernate.ddl.auto=
-- 
GitLab