Various cleanups
Changed gradle-all.sh so that Gradle JVM settings are picked up from grade.properties Added Gradle plugin that verifies that SPRING_DATA_MONGODB_URI is set before running any tests that need MongoDB
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import org.gradle.api.*
|
||||
|
||||
|
||||
class VerifyMongoDBConfigurationPlugin implements Plugin<Project> {
|
||||
void apply(Project project) {
|
||||
project.test {
|
||||
beforeSuite { x ->
|
||||
if (x.parent == null) {
|
||||
if (System.getenv("SPRING_DATA_MONGODB_URI") == null)
|
||||
throw new RuntimeException("Please make sure that the environment variable SPRING_DATA_MONGODB_URI is set, e.g. export SPRING_DATA_MONGODB_URI=mongodb://192.168.59.103/mydb")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user