aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-es
diff options
context:
space:
mode:
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>2022-10-31 12:25:54 +0100
committersonartech <sonartech@sonarsource.com>2022-11-01 20:03:09 +0000
commitb0be5da0c49b74538dbce98014298a104d4ac5b0 (patch)
tree6a9b4734fefe01a34ef2b45336276be4fafa1483 /server/sonar-webserver-es
parentb309ce1704e490af7daef2a0d0ab1bbba8c930b8 (diff)
downloadsonarqube-b0be5da0c49b74538dbce98014298a104d4ac5b0.tar.gz
sonarqube-b0be5da0c49b74538dbce98014298a104d4ac5b0.zip
SONAR-17524 changing default branch name for projects
Diffstat (limited to 'server/sonar-webserver-es')
-rw-r--r--server/sonar-webserver-es/src/test/java/org/sonar/server/issue/index/IssueQueryFactoryTest.java5
1 files changed, 3 insertions, 2 deletions
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);
}