diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-05-07 17:39:21 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2024-05-13 09:37:44 +0200 |
commit | 9e72835bb09a703c7bb91ba387fef09f881d5418 (patch) | |
tree | 5c2bd132588cdfc824bd550a052c297e7569ed09 /src/test/java/org/sonarsource/scanner/cli | |
parent | f2df80dbd277ffa97d2d43f8e44368944d3e1e4b (diff) | |
download | sonar-scanner-cli-9e72835bb09a703c7bb91ba387fef09f881d5418.tar.gz sonar-scanner-cli-9e72835bb09a703c7bb91ba387fef09f881d5418.zip |
Log improvements
Diffstat (limited to 'src/test/java/org/sonarsource/scanner/cli')
-rw-r--r-- | src/test/java/org/sonarsource/scanner/cli/MainTest.java | 2 | ||||
-rw-r--r-- | src/test/java/org/sonarsource/scanner/cli/StatsTest.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java index 7b6ccfd..48b2ed3 100644 --- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java @@ -61,6 +61,7 @@ class MainTest { void setUp() { when(scannerEngineBootstrapperFactory.create(any(Properties.class), any(String.class))).thenReturn(bootstrapper); when(bootstrapper.bootstrap()).thenReturn(engine); + when(engine.analyze(any())).thenReturn(true); when(conf.properties()).thenReturn(properties); } @@ -223,7 +224,6 @@ class MainTest { inOrder.verify(exit, times(1)).exit(Exit.SUCCESS); inOrder.verify(scannerEngineBootstrapperFactory, times(1)).create(p, ""); - inOrder.verify(exit, times(1)).exit(Exit.SUCCESS); } @Test diff --git a/src/test/java/org/sonarsource/scanner/cli/StatsTest.java b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java index 4895640..174acbc 100644 --- a/src/test/java/org/sonarsource/scanner/cli/StatsTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java @@ -34,9 +34,8 @@ class StatsTest { void shouldPrintStats() { new Stats().start().stop(); - assertThat(logTester.logs(Level.INFO)).hasSize(2); + assertThat(logTester.logs(Level.INFO)).hasSize(1); assertThat(logTester.logs(Level.INFO).get(0)).startsWith("Total time: "); - assertThat(logTester.logs(Level.INFO).get(1)).startsWith("Final Memory: "); } @Test |