aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test/java
diff options
context:
space:
mode:
authorJanos Gyerik <janos.gyerik@sonarsource.com>2017-10-09 15:53:10 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-10-12 09:56:30 +0200
commitf325a040cbf7926fe2f0c124c67d26a24bc7a24a (patch)
tree846e19736e9159cfe23a755cbe276284b4ff80d1 /sonar-scanner-engine/src/test/java
parentd78878cddfb2ec620153f14d11383b17a4315e69 (diff)
downloadsonarqube-f325a040cbf7926fe2f0c124c67d26a24bc7a24a.tar.gz
sonarqube-f325a040cbf7926fe2f0c124c67d26a24bc7a24a.zip
Analyze all files even in short branches
Diffstat (limited to 'sonar-scanner-engine/src/test/java')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/DefaultAnalysisModeTest.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/DefaultAnalysisModeTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/DefaultAnalysisModeTest.java
index 9e896ecdc56..df003ae4e8e 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/DefaultAnalysisModeTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/analysis/DefaultAnalysisModeTest.java
@@ -25,19 +25,16 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.scanner.bootstrap.GlobalAnalysisMode;
-import org.sonar.scanner.scan.branch.BranchConfiguration;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public class DefaultAnalysisModeTest {
- private BranchConfiguration branchConfig;
private GlobalAnalysisMode globalMode;
@Before
public void setUp() {
- branchConfig = mock(BranchConfiguration.class);
globalMode = mock(GlobalAnalysisMode.class);
}
@@ -45,12 +42,11 @@ public class DefaultAnalysisModeTest {
public ExpectedException thrown = ExpectedException.none();
@Test
- public void dont_scan_all_if_short_lived_branch() {
+ public void scan_all_even_on_short_lived_branch() {
AnalysisProperties analysisProps = new AnalysisProperties(Collections.singletonMap("sonar.scanAllFiles", "true"));
- when(branchConfig.isShortLivingBranch()).thenReturn(true);
DefaultAnalysisMode mode = createmode(analysisProps);
- assertThat(mode.scanAllFiles()).isFalse();
+ assertThat(mode.scanAllFiles()).isTrue();
}
@Test
@@ -90,7 +86,7 @@ public class DefaultAnalysisModeTest {
}
private DefaultAnalysisMode createmode(AnalysisProperties analysisProps) {
- return new DefaultAnalysisMode(analysisProps, branchConfig, globalMode);
+ return new DefaultAnalysisMode(analysisProps, globalMode);
}
}