aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/sonarsource/scanner/cli/MainTest.java
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-03-08 18:42:05 +0100
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-03-08 18:42:05 +0100
commit1affe1fe830e4e17e50fdf9d801ce4b499a3bdb0 (patch)
tree7699b6c8b8c54366c214668b1a3f55cee0b80cc6 /src/test/java/org/sonarsource/scanner/cli/MainTest.java
parente981a9e5487245ece21dba51a5e393257cd2b9db (diff)
downloadsonar-scanner-cli-1affe1fe830e4e17e50fdf9d801ce4b499a3bdb0.tar.gz
sonar-scanner-cli-1affe1fe830e4e17e50fdf9d801ce4b499a3bdb0.zip
SONARUNNER-152 Scanner does not log Server version
Diffstat (limited to 'src/test/java/org/sonarsource/scanner/cli/MainTest.java')
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/MainTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
index e2fd69c..1936ca8 100644
--- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
@@ -151,6 +151,18 @@ public class MainTest {
}
@Test
+ public void shouldLogServerVersion() throws IOException {
+ when(runner.serverVersion()).thenReturn("5.5");
+ Properties p = new Properties();
+ when(cli.isDisplayVersionOnly()).thenReturn(true);
+ when(conf.properties()).thenReturn(p);
+
+ Main main = new Main(shutdown, cli, conf, runnerFactory, logs);
+ main.execute();
+ verify(logs).info("SonarQube server 5.5");
+ }
+
+ @Test
public void should_configure_logging() throws IOException {
Properties p = new Properties();
p.put("sonar.verbose", "true");