aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2018-02-01 15:30:48 +0100
committerTeryk Bellahsene <teryk@users.noreply.github.com>2018-03-13 14:05:36 +0100
commit751e4000e40a4af66b80767d632b1bef64dc5647 (patch)
tree0bf9735c29f6bae50ec10c11d8fbf7e50e909722 /sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd
parent23e4b51cde3ed0dc76ca1d73aa6cc31715dd25d4 (diff)
downloadsonarqube-751e4000e40a4af66b80767d632b1bef64dc5647.tar.gz
sonarqube-751e4000e40a4af66b80767d632b1bef64dc5647.zip
MMF-1134 Make pull request a 1st class citizen
SONAR-10366 Add pull request object to api/project_branches/list and api/ce/activity SONAR-10365 Analyze pull requests as 1st class citizen SONAR-10366 SONAR-10367 Create WS api/projet_pull_requests/list and delete SONAR-10383 Add Pull Request information when listing CE tasks SONAR-10365 Add key type in PROJECT_BRANCHES (#3063) SONAR-10371 Add pullRequest parameter in the Web API (#3076) * ComponentFinder searches by branch or pull request * Add pullRequest parameter to WS api/issues/* WS * Add pullRequest parameter to api/settings/* WS * Add pullRequest parameter to api/badges/* WS * Add pullRequest parameter to api/components/* WS * Add pullRequest parameter to api/sources/* WS SONAR-10368 Copy issue states from pull request after it's merged SONAR-10373 Send notifications for events on issues of a pull request SONAR-10365 Add pull_request_binary column in project_branches (#3073) SONAR-10433 Store pull request in projects table SONAR-10371 Add pullRequest field in the Web API SONAR-10365 Analyze pull requests as 1st class citizen BRANCH-45 Expose issue resolution for PR decoration BRANCH-49 Basic support of pull request analysis on pull request branch BRANCH-47 Fail when user tries to analyze a pull request and the plugin is not available SONAR-10366 update pull request decorated links to project and issues SONAR-10365 Use pull request id as key instead of branch name SONAR-10454 Update embedded Git 1.4 and SVN 1.7 SONAR-10365 rename sonar.pullrequest.id to sonar.pullrequest.key SONAR-10383 api/navigation/component returns the pull request key
Diffstat (limited to 'sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd')
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java
index 8605ab5418d..f685e4f22cf 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/cpd/CpdExecutorTest.java
@@ -100,7 +100,18 @@ public class CpdExecutorTest {
@Test
public void skipIfShortBranch() {
- when(branchConfig.isShortLivingBranch()).thenReturn(true);
+ when(branchConfig.isShortOrPullRequest()).thenReturn(true);
+ index = mock(SonarCpdBlockIndex.class);
+ executor = new CpdExecutor(settings, index, publisher, componentStore, branchConfig);
+
+ executor.execute();
+
+ verifyZeroInteractions(index);
+ }
+
+ @Test
+ public void skip_if_pull_request() {
+ when(branchConfig.isShortOrPullRequest()).thenReturn(true);
index = mock(SonarCpdBlockIndex.class);
executor = new CpdExecutor(settings, index, publisher, componentStore, branchConfig);