diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2014-10-28 12:08:02 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2014-10-28 13:11:30 +0100 |
commit | 96911ca23e7f017975567d3ba1afb0994a230aff (patch) | |
tree | e6c1b4acd6bebf91a39c48b698a07852f316dec5 /server | |
parent | cf5c90b995737c1027ae599a8392748c85b96dc2 (diff) | |
download | sonarqube-96911ca23e7f017975567d3ba1afb0994a230aff.tar.gz sonarqube-96911ca23e7f017975567d3ba1afb0994a230aff.zip |
fix quality flaws
Diffstat (limited to 'server')
2 files changed, 15 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java b/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java index e49061336a7..b37ea614293 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/component/ComponentCleanerService.java @@ -56,7 +56,7 @@ public class ComponentCleanerService implements ServerComponent { } private void deleteIssuesFromIndex(String projectKey) { - + // TODO implement ! } private void deletePermissionIndexes(DbSession session, String projectUuid) { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/SynchronizeProjectPermissionsStepMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/SynchronizeProjectPermissionsStepMediumTest.java index c248b93e786..a4f08f5692c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/SynchronizeProjectPermissionsStepMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/SynchronizeProjectPermissionsStepMediumTest.java @@ -109,4 +109,18 @@ public class SynchronizeProjectPermissionsStepMediumTest { return project; } + + @Test + public void do_nothing_when_permissions_are_already_set() throws Exception { + ComponentDto project = insertPermissionsForProject(DEFAULT_PROJECT_KEY); + + queue.add(DEFAULT_PROJECT_KEY, 123L); + List<AnalysisReportDto> reports = queue.findByProjectKey(DEFAULT_PROJECT_KEY); + getAndSetProjectStep.execute(session, reports.get(0)); + + sut.execute(session, reports.get(0)); + + IssueAuthorizationDoc issueAuthorizationIndex = tester.get(IssueAuthorizationIndex.class).getNullableByKey(project.uuid()); + assertThat(issueAuthorizationIndex).isNotNull(); + } } |