From b0be5da0c49b74538dbce98014298a104d4ac5b0 Mon Sep 17 00:00:00 2001 From: Lukasz Jarocki Date: Mon, 31 Oct 2022 12:25:54 +0100 Subject: SONAR-17524 changing default branch name for projects --- .../java/org/sonar/server/issue/index/IssueQueryFactoryTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/sonar-webserver-es') diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java index adc23e044ac..e77377b038f 100644 --- a/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java +++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java @@ -55,6 +55,7 @@ import static org.sonar.api.resources.Qualifiers.APP; import static org.sonar.api.utils.DateUtils.addDays; import static org.sonar.api.utils.DateUtils.parseDateTime; import static org.sonar.api.web.UserRole.USER; +import static org.sonar.db.component.BranchDto.DEFAULT_PROJECT_MAIN_BRANCH_NAME; import static org.sonar.db.component.ComponentTesting.newDirectory; import static org.sonar.db.component.ComponentTesting.newFileDto; import static org.sonar.db.component.ComponentTesting.newModuleDto; @@ -608,12 +609,12 @@ public class IssueQueryFactoryTest { assertThat(underTest.create(new SearchRequest() .setProjects(singletonList(project.getKey())) - .setBranch("master"))) + .setBranch(DEFAULT_PROJECT_MAIN_BRANCH_NAME))) .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.projectUuids()), IssueQuery::isMainBranch) .containsOnly(project.uuid(), singletonList(project.uuid()), true); assertThat(underTest.create(new SearchRequest() .setComponents(singletonList(project.getKey())) - .setBranch("master"))) + .setBranch(DEFAULT_PROJECT_MAIN_BRANCH_NAME))) .extracting(IssueQuery::branchUuid, query -> new ArrayList<>(query.projectUuids()), IssueQuery::isMainBranch) .containsOnly(project.uuid(), singletonList(project.uuid()), true); } -- cgit v1.2.3