From: Simon Brandhof Date: Thu, 7 Jul 2011 10:14:24 +0000 (+0000) Subject: Sonar runner: refactor unit test to remove conflict with sonar analysis X-Git-Tag: 2.5-rc1~337 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fdda729e0b8a2b907f19b84720ac44dd1d8d47c4;p=sonar-scanner-cli.git Sonar runner: refactor unit test to remove conflict with sonar analysis --- diff --git a/src/test/java/org/sonar/runner/MainTest.java b/src/test/java/org/sonar/runner/MainTest.java index 2e839f9..4f22fc3 100644 --- a/src/test/java/org/sonar/runner/MainTest.java +++ b/src/test/java/org/sonar/runner/MainTest.java @@ -95,8 +95,8 @@ public class MainTest { "-D", "project.home=" + projectHome.getCanonicalPath() }); - assertThat(props.getProperty("project.key"), is("foo")); - assertThat(props.getProperty("sonar.host.url"), is("http://overridden/sonar")); - assertThat(props.getProperty("sonar.jdbc.url"), is("jdbc:mysql:localhost/sonar")); + assertThat(props.getProperty("project.prop"), is("foo")); + assertThat(props.getProperty("overridden.prop"), is("project scope")); + assertThat(props.getProperty("global.prop"), is("jdbc:mysql:localhost/sonar")); } } diff --git a/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project/sonar-project.properties b/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project/sonar-project.properties index d9ed633..0d1e025 100644 --- a/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project/sonar-project.properties +++ b/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project/sonar-project.properties @@ -1,4 +1,4 @@ -project.key=foo +project.prop=foo # overridden property -sonar.host.url=http://overridden/sonar \ No newline at end of file +overridden.prop=project scope \ No newline at end of file diff --git a/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties b/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties index 0f6524d..7edfb99 100644 --- a/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties +++ b/src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties @@ -1,2 +1,2 @@ -sonar.host.url=http://localhost/sonar -sonar.jdbc.url=jdbc:mysql:localhost/sonar +overridden.prop=runner scope +global.prop=jdbc:mysql:localhost/sonar