summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-05-10 14:07:19 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-05-10 15:05:57 +0200
commitd3a59c7cd59ac7dd3328ef25172542dd30f376fd (patch)
treed2b0329bbc65ffd8d472d9e5ae6407483516469b /server
parent2d9bae8c4d2d03c0cccd77d567678af84ed271d5 (diff)
downloadsonarqube-d3a59c7cd59ac7dd3328ef25172542dd30f376fd.tar.gz
sonarqube-d3a59c7cd59ac7dd3328ef25172542dd30f376fd.zip
Remove ResourceIndexDao.indexProjects()
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java14
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/BulkApplyTemplateActionTest.java2
3 files changed, 11 insertions, 11 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java
index 81f47d59f97..9617ea2e474 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java
@@ -118,7 +118,7 @@ public class TreeActionTest {
SnapshotDto directorySnapshot = componentDb.insertComponentAndSnapshot(newDirectory(project, "directory-path-1"), moduleSnapshot);
componentDb.insertComponentAndSnapshot(newFileDto(project, 10), directorySnapshot);
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
TreeWsResponse response = call(ws.newRequest()
.setParam(PARAM_STRATEGY, "children")
@@ -149,7 +149,7 @@ public class TreeActionTest {
SnapshotDto directorySnapshot = componentDb.insertComponentAndSnapshot(newDirectory(project, "directory-path-1"), moduleSnapshot);
componentDb.insertComponentAndSnapshot(newFileDto(project, 1), directorySnapshot);
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
TreeWsResponse response = call(ws.newRequest()
.setParam(PARAM_STRATEGY, "all")
@@ -175,7 +175,7 @@ public class TreeActionTest {
SnapshotDto directorySnapshot = componentDb.insertComponentAndSnapshot(newDirectory(project, "directory-path-1"), moduleSnapshot);
componentDb.insertComponentAndSnapshot(newFileDto(project, 3), directorySnapshot);
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
TreeWsResponse response = call(ws.newRequest()
.setParam(PARAM_STRATEGY, "leaves")
@@ -195,7 +195,7 @@ public class TreeActionTest {
componentDb.insertComponentAndSnapshot(newFileDto(project, 2), projectSnapshot);
componentDb.insertComponentAndSnapshot(newModuleDto("module-uuid-1", project), projectSnapshot);
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
TreeWsResponse response = call(ws.newRequest()
.setParam(PARAM_STRATEGY, "all")
@@ -215,7 +215,7 @@ public class TreeActionTest {
componentDb.insertComponentAndSnapshot(module, projectSnapshot);
componentDb.insertComponentAndSnapshot(newDirectory(project, "path/directory/", "directory-uuid-1"), projectSnapshot);
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
TreeWsResponse response = call(ws.newRequest()
.setParam(PARAM_STRATEGY, "all")
@@ -234,7 +234,7 @@ public class TreeActionTest {
componentDb.insertComponentAndSnapshot(newProjectCopy("project-uuid-1-copy", project, view), viewSnapshot);
componentDb.insertComponentAndSnapshot(newSubView(view, "sub-view-uuid", "sub-view-key").setName("sub-view-name"), viewSnapshot);
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
TreeWsResponse response = call(ws.newRequest()
.setParam(PARAM_STRATEGY, "children")
@@ -414,7 +414,7 @@ public class TreeActionTest {
projectSnapshot);
}
db.commit();
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
return project;
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java
index 73e96ee5aec..d2b05d5525d 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java
@@ -184,7 +184,7 @@ public class SearchProjectPermissionsActionTest {
public void search_by_query_on_name() {
componentDb.insertProjectAndSnapshot(newProjectDto().setName("project-name"));
componentDb.insertProjectAndSnapshot(newProjectDto().setName("another-name"));
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
String result = ws.newRequest()
.setParam(TEXT_QUERY, "project")
@@ -198,7 +198,7 @@ public class SearchProjectPermissionsActionTest {
public void search_by_query_on_key_must_match_exactly() {
componentDb.insertProjectAndSnapshot(newProjectDto().setKey("project-key"));
componentDb.insertProjectAndSnapshot(newProjectDto().setKey("another-key"));
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
String result = ws.newRequest()
.setParam(TEXT_QUERY, "project-key")
@@ -213,7 +213,7 @@ public class SearchProjectPermissionsActionTest {
for (int i = 1; i <= 1001; i++) {
componentDb.insertProjectAndSnapshot(newProjectDto("project-uuid-" + i));
}
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
String result = ws.newRequest()
.setParam(TEXT_QUERY, "project")
diff --git a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/BulkApplyTemplateActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/BulkApplyTemplateActionTest.java
index 8b3e5a8a9df..a85274eaa32 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/BulkApplyTemplateActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/BulkApplyTemplateActionTest.java
@@ -181,7 +181,7 @@ public class BulkApplyTemplateActionTest {
// match must be exact on key
ComponentDto projectUntouched = newProjectDto().setKey("new-sonar").setName("project-name");
componentDb.insertProjectAndSnapshot(projectUntouched);
- componentDb.indexProjectsAndViews();
+ componentDb.indexAllComponents();
call(ws.newRequest()
.setParam(PARAM_TEMPLATE_ID, template1.getUuid())