aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-runner-dist
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-07-08 12:09:01 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2013-07-08 12:09:01 +0200
commit1085fe249e3dcef1a48d15334ed1e1b9097eba8c (patch)
treea14839cc4f8dfd4028e08faac04549d5f5d5adfe /sonar-runner-dist
parentf98321edfb79aa7e7c958bcf3cb22e5e8dd9ace0 (diff)
downloadsonar-scanner-cli-1085fe249e3dcef1a48d15334ed1e1b9097eba8c.tar.gz
sonar-scanner-cli-1085fe249e3dcef1a48d15334ed1e1b9097eba8c.zip
Fix UTs
Diffstat (limited to 'sonar-runner-dist')
-rw-r--r--sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java34
-rw-r--r--sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties2
-rw-r--r--sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties4
3 files changed, 20 insertions, 20 deletions
diff --git a/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java b/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java
index e4296c5..d9ad17d 100644
--- a/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java
+++ b/sonar-runner-dist/src/test/java/org/sonar/runner/ConfTest.java
@@ -45,7 +45,7 @@ public class ConfTest {
File home = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/").toURI());
args.setProperty("runner.home", home.getCanonicalPath());
- assertThat(conf.properties().get("sonar.host.url")).isEqualTo("http://moon/sonar");
+ assertThat(conf.properties().get("sonar.prop")).isEqualTo("value");
}
@Test
@@ -58,23 +58,23 @@ public class ConfTest {
File settings = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties").toURI());
args.setProperty("runner.settings", settings.getCanonicalPath());
- assertThat(conf.properties().get("sonar.host.url")).isEqualTo("http://other/sonar");
+ assertThat(conf.properties().get("sonar.prop")).isEqualTo("otherValue");
}
-// @Test
-// public void shouldLoadCompleteConfiguration() throws Exception {
-// File runnerHome = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner").toURI());
-// File projectHome = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project").toURI());
-// Main main = new Main();
-// Properties args = main.parseArguments(new String[] {
-// "-D", "runner.home=" + runnerHome.getCanonicalPath(),
-// "-D", "project.home=" + projectHome.getCanonicalPath()
-// });
-// main.loadProperties(args);
-//
-// assertThat(main.projectProperties.getProperty("project.prop")).isEqualTo("foo");
-// assertThat(main.projectProperties.getProperty("overridden.prop")).isEqualTo("project scope");
-// assertThat(main.globalProperties.getProperty("global.prop")).isEqualTo("jdbc:mysql:localhost/sonar");
-// }
+ // @Test
+ // public void shouldLoadCompleteConfiguration() throws Exception {
+ // File runnerHome = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner").toURI());
+ // File projectHome = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project").toURI());
+ // Main main = new Main();
+ // Properties args = main.parseArguments(new String[] {
+ // "-D", "runner.home=" + runnerHome.getCanonicalPath(),
+ // "-D", "project.home=" + projectHome.getCanonicalPath()
+ // });
+ // main.loadProperties(args);
+ //
+ // assertThat(main.projectProperties.getProperty("project.prop")).isEqualTo("foo");
+ // assertThat(main.projectProperties.getProperty("overridden.prop")).isEqualTo("project scope");
+ // assertThat(main.globalProperties.getProperty("global.prop")).isEqualTo("jdbc:mysql:localhost/sonar");
+ // }
}
diff --git a/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties b/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties
index 740a616..33dc79b 100644
--- a/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties
+++ b/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties
@@ -1 +1 @@
-sonar.host.url=http://other/sonar \ No newline at end of file
+sonar.prop=otherValue
diff --git a/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties b/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties
index e7d5c09..1e03622 100644
--- a/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties
+++ b/sonar-runner-dist/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties
@@ -1,2 +1,2 @@
-sonar.host.url=http://moon/sonar
-sonar.jdbc.url=jdbc:mysql:localhost/sonar \ No newline at end of file
+sonar.prop=value
+sonar.jdbc.url=jdbc:mysql:localhost/sonar