Browse Source

Sonar runner: refactor unit test to remove conflict with sonar analysis

tags/2.5-rc1
Simon Brandhof 13 years ago
parent
commit
fdda729e0b

+ 3
- 3
src/test/java/org/sonar/runner/MainTest.java View File

@@ -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"));
}
}

+ 2
- 2
src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project/sonar-project.properties View File

@@ -1,4 +1,4 @@
project.key=foo
project.prop=foo

# overridden property
sonar.host.url=http://overridden/sonar
overridden.prop=project scope

+ 2
- 2
src/test/resources/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties View File

@@ -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

Loading…
Cancel
Save