aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-common
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2021-08-12 14:47:56 +0200
committersonartech <sonartech@sonarsource.com>2021-08-19 20:08:14 +0000
commit99542044a382aa87d682f3544e9004b0d2a559d1 (patch)
treedd5c62a5fc56ad6edf2d6c51e5447975ae531ece /server/sonar-server-common
parentf660a790f6d88b5d68bf1f1677cd2bc0ae657309 (diff)
downloadsonarqube-99542044a382aa87d682f3544e9004b0d2a559d1.tar.gz
sonarqube-99542044a382aa87d682f3544e9004b0d2a559d1.zip
SONAR-15142 add 'name' and 'key' in component context for Audit
Diffstat (limited to 'server/sonar-server-common')
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/component/index/ComponentIndexerTest.java3
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/measure/index/ProjectMeasuresIndexerTest.java2
2 files changed, 2 insertions, 3 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/component/index/ComponentIndexerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/component/index/ComponentIndexerTest.java
index d973d4ecabc..0ff178eb394 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/component/index/ComponentIndexerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/component/index/ComponentIndexerTest.java
@@ -23,7 +23,6 @@ import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.resources.Qualifiers;
import org.sonar.api.utils.System2;
import org.sonar.db.DbClient;
import org.sonar.db.DbSession;
@@ -208,7 +207,7 @@ public class ComponentIndexerTest {
indexProject(project, PROJECT_CREATION);
assertThatIndexHasSize(1);
- db.getDbClient().purgeDao().deleteProject(db.getSession(), project.uuid(), PROJECT);
+ db.getDbClient().purgeDao().deleteProject(db.getSession(), project.uuid(), PROJECT, project.name(), project.getKey());
indexProject(project, PROJECT_DELETION);
assertThatIndexHasSize(0);
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/measure/index/ProjectMeasuresIndexerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/measure/index/ProjectMeasuresIndexerTest.java
index ad817103a70..d0c7bb9f620 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/measure/index/ProjectMeasuresIndexerTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/measure/index/ProjectMeasuresIndexerTest.java
@@ -235,7 +235,7 @@ public class ProjectMeasuresIndexerTest {
indexProject(project, PROJECT_CREATION);
assertThatIndexContainsOnly(project);
- db.getDbClient().purgeDao().deleteProject(db.getSession(), project.uuid(), Qualifiers.PROJECT);
+ db.getDbClient().purgeDao().deleteProject(db.getSession(), project.uuid(), Qualifiers.PROJECT, project.name(), project.getKey());
IndexingResult result = indexProject(project, PROJECT_DELETION);
assertThat(es.countDocuments(TYPE_PROJECT_MEASURES)).isZero();