Commit bd0bf8f4 authored by Greg Messner's avatar Greg Messner
Browse files

Now looks for properties file in home dir first and then project dir (#311).

parent a62fa83b
......@@ -11,16 +11,17 @@ public class HelperUtils {
private static Properties testProperties;
static {
// Get the maven basedir, we use it to locate the properties for the unit tests
String basedir = (String) System.getProperties().get("basedir");
// If we are performing a release in target/checkout, trim off the target/checkout directory from basedir
if (basedir != null && (basedir.endsWith("target/checkout") || basedir.endsWith("target\\checkout"))) {
basedir = basedir.substring(0, basedir.length() - 15);
}
File propertiesFile = new File((String) System.getProperties().get("user.home"), "test-gitlab4j.properties");
if (!propertiesFile.exists()) {
// Get the maven basedir, we use it to locate the properties for the unit tests
String basedir = (String) System.getProperties().get("basedir");
// If we are performing a release in target/checkout, trim off the target/checkout directory from basedir
if (basedir != null && (basedir.endsWith("target/checkout") || basedir.endsWith("target\\checkout"))) {
basedir = basedir.substring(0, basedir.length() - 15);
}
propertiesFile = new File(basedir, "src/test/gitlab/test-gitlab4j.properties");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment