aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>2017-07-28 15:32:29 +0200
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>2017-08-09 15:09:54 +0200
commitf32d27df1c833bdb2e8153020b6613cb37ba38fa (patch)
treeb86d4e77b105509e40f5fdb24fdbe4e10306b075 /server/sonar-db-core
parent4a0af974b74e68159b9304752b5832487bf58cf8 (diff)
downloadsonarqube-f32d27df1c833bdb2e8153020b6613cb37ba38fa.tar.gz
sonarqube-f32d27df1c833bdb2e8153020b6613cb37ba38fa.zip
SONAR-8798 convert medium tests to unit tests
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
index 30752123607..8476c8ef8c9 100644
--- a/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
+++ b/server/sonar-db-core/src/test/java/org/sonar/db/CoreTestDb.java
@@ -91,7 +91,6 @@ class CoreTestDb {
((H2Database) db).executeScript(schemaPath);
} else {
db.stop();
-
}
}
isDefault = (schemaPath == null);
@@ -153,6 +152,7 @@ class CoreTestDb {
InputStream input = null;
try {
URI uri = new URI(url);
+
if (url.startsWith("file:")) {
File file = new File(uri);
input = FileUtils.openInputStream(file);
@@ -164,8 +164,8 @@ class CoreTestDb {
}
input = connection.getInputStream();
-
}
+
Properties props = new Properties();
props.load(input);
settings.addProperties(props);
@@ -179,6 +179,4 @@ class CoreTestDb {
IOUtils.closeQuietly(input);
}
}
-
-
}