forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Test Environment to use its own local.cfg INSTEAD OF dspace.cf…
…g.more / merging multiple configs
- Loading branch information
Showing
9 changed files
with
152 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 0 additions & 98 deletions
98
dspace-api/src/test/data/dspaceFolder/config/hibernate.cfg.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# A "local.cfg" which is used by our Unit/Integration Testing framework | ||
# | ||
# Any configurations added to this file will automatically OVERRIDE configurations | ||
# of the same name in any of the DSpace *.cfg files. | ||
# | ||
# While some sample configurations are provided below, you may also copy | ||
# ANY configuration from ANY DSpace *.cfg file into this "local.cfg" to OVERRIDE | ||
# its default value. This includes any of these files: | ||
# * [dspace]/config/dspace.cfg | ||
# * Or any configuration file that is loaded into 'dspace.cfg' | ||
# (see "include =" settings near the end of dspace.cfg for full list) | ||
# | ||
# You may also specify additional configuration files to load by simply adding: | ||
# include = [file-path] | ||
# The [file-path] should be relative to the [dspace]/config/ folder, e.g. | ||
# include = modules/authentication-ldap.cfg | ||
# | ||
# Any commented out settings in this file are simply ignored. A configuration | ||
# will only override another configuration if it has the EXACT SAME key/name. | ||
# For example, including "dspace.dir" in this local.cfg will override the | ||
# default value of "dspace.dir" in the dspace.cfg file. | ||
# | ||
|
||
########################## | ||
# SERVER CONFIGURATION # | ||
########################## | ||
|
||
# DSpace installation directory. | ||
# This is the location where you want to install DSpace. | ||
# Windows note: Please remember to use forward slashes for all paths (e.g. C:/dspace) | ||
# NOTE: COMMENTED OUT FOR TEST ENVIRONMENT, AS WE DYNAMICALLY SET THIS VIA | ||
# A SYSTEM PROPERTY (-Ddspace.dir) in the maven-surefire-plugin configuration | ||
#dspace.dir=/dspace | ||
|
||
########################## | ||
# DATABASE CONFIGURATION # | ||
########################## | ||
|
||
# For Unit Testing we use the H2 (in memory) database | ||
db.driver = org.h2.Driver | ||
db.dialect=org.hibernate.dialect.H2Dialect | ||
# Use a 10 second database lock timeout to avoid occasional JDBC lock timeout errors | ||
db.url = jdbc:h2:mem:test;LOCK_TIMEOUT=10000; | ||
db.username = sa | ||
db.password = | ||
# H2's default schema is PUBLIC | ||
db.schema = PUBLIC | ||
|
||
####################### | ||
# EMAIL CONFIGURATION # | ||
####################### | ||
|
||
# SMTP mail server (allows DSpace to send email notifications) | ||
mail.server = localhost | ||
|
||
# An option is added to disable the mailserver. By default, this property is set to false | ||
# By setting mail.server.disabled = true, DSpace will not send out emails. | ||
# It will instead log the subject of the email which should have been sent | ||
# This is especially useful for development and test environments where production data is used when testing functionality. | ||
mail.server.disabled = true | ||
|
||
######################## | ||
# HANDLE CONFIGURATION # | ||
######################## | ||
|
||
# CNRI Handle prefix | ||
# (Defaults to a dummy/fake prefix of 123456789) | ||
handle.prefix = 123456789 | ||
|
||
##################### | ||
# LOGLEVEL SETTINGS # | ||
##################### | ||
loglevel.other = INFO | ||
# loglevel.other: Log level for other third-party tools/APIs used by DSpace | ||
# Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL | ||
loglevel.dspace = INFO | ||
# loglevel.dspace: Log level for all DSpace-specific code (org.dspace.*) | ||
# Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL | ||
|
||
|
||
########################################### | ||
# CUSTOM UNIT / INTEGRATION TEST SETTINGS # | ||
########################################### | ||
# Configure authority control for Unit Testing (in DSpaceControlledVocabularyTest) | ||
# (This overrides default, commented out settings in dspace.cfg) | ||
plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority = \ | ||
org.dspace.content.authority.DCInputAuthority, \ | ||
org.dspace.content.authority.DSpaceControlledVocabulary | ||
|
||
# Configure some more Plugins for PluginTest class | ||
# NOTE: Plugins are just *interfaces*. So, here we are defining some plugins | ||
# based on java.util.List interface and giving them names. | ||
# (These are used by PluginTest) | ||
plugin.named.java.util.List = \ | ||
java.util.ArrayList = MyArrayList, \ | ||
java.util.LinkedList = MyLinkedList, \ | ||
java.util.AttributeList = MyAttributeList | ||
|
||
# Define a single Map plugin (used by PluginTest) | ||
plugin.single.java.util.Map = java.util.HashMap | ||
|
||
# Define a sequence of Collection plugins (used by PluginTest) | ||
plugin.sequence.java.util.Collection = \ | ||
java.util.ArrayList, \ | ||
java.util.LinkedList, \ | ||
java.util.Stack, \ | ||
java.util.TreeSet | ||
|
||
# Enable a test authority control on dc.language.iso field | ||
choices.plugin.dc.language.iso = common_iso_languages | ||
choices.presentation.dc.language.iso = select | ||
authority.controlled.dc.language.iso = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.