Skip to content

Commit

Permalink
Set path to databases.properties through system property.
Browse files Browse the repository at this point in the history
This makes it possible to easily run tests on multiple testing VMs with
different database configurations from the same checkout of Slick.

Review by @cvogt
  • Loading branch information
szeiger committed Feb 28, 2013
1 parent d847994 commit 0603804
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -28,7 +28,7 @@ object TestDB {
}
private lazy val dbProps = {
val p = new Properties
val f = new File("test-dbs", "databases.properties")
val f = new File(sys.props.getOrElse("slick.testkit.dbprops", "test-dbs/databases.properties"))
if(f.isFile) {
val in = new FileInputStream(f)
try { p.load(in) } finally { in.close() }
Expand Down Expand Up @@ -208,4 +208,4 @@ object ExternalTestDB {
new URLClassLoader(Array(new URL(url)), getClass.getClassLoader).loadClass(driverClass).newInstance.asInstanceOf[Driver]
)
}
}
}

0 comments on commit 0603804

Please sign in to comment.