Fix SchemaUpdaterTest and ListChildProjectsIT
The AllUsersName binding is required, but was missing. The All-Users repository exists as a child of All-Users. Change-Id: Iaf3ddec01c8a3419ceb044bc29f155f6f8eb0f68
This commit is contained in:
@@ -53,7 +53,7 @@ public class ListChildProjectsIT extends AbstractDaemonTest {
|
||||
assertEquals(HttpStatus.SC_OK, r.getStatusCode());
|
||||
List<ProjectInfo> projectInfoList = toProjectInfoList(r);
|
||||
// Project 'p' was already created in the base class
|
||||
assertTrue(projectInfoList.size() == 1);
|
||||
assertTrue(projectInfoList.size() == 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -67,7 +67,11 @@ public class ListChildProjectsIT extends AbstractDaemonTest {
|
||||
|
||||
RestResponse r = GET("/projects/" + allProjects.get() + "/children/");
|
||||
assertEquals(HttpStatus.SC_OK, r.getStatusCode());
|
||||
assertProjects(Arrays.asList(existingProject, child1, child2), toProjectInfoList(r));
|
||||
assertProjects(
|
||||
Arrays.asList(
|
||||
new Project.NameKey("All-Users"),
|
||||
existingProject, child1, child2),
|
||||
toProjectInfoList(r));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -19,6 +19,7 @@ import com.google.gerrit.reviewdb.server.ReviewDb;
|
||||
import com.google.gerrit.server.GerritPersonIdent;
|
||||
import com.google.gerrit.server.GerritPersonIdentProvider;
|
||||
import com.google.gerrit.server.config.AllProjectsName;
|
||||
import com.google.gerrit.server.config.AllUsersName;
|
||||
import com.google.gerrit.server.config.AnonymousCowardName;
|
||||
import com.google.gerrit.server.config.AnonymousCowardNameProvider;
|
||||
import com.google.gerrit.server.config.FactoryModule;
|
||||
@@ -89,6 +90,8 @@ public class SchemaUpdaterTest {
|
||||
|
||||
bind(AllProjectsName.class)
|
||||
.toInstance(new AllProjectsName("All-Projects"));
|
||||
bind(AllUsersName.class)
|
||||
.toInstance(new AllUsersName("All-Users"));
|
||||
|
||||
bind(GitRepositoryManager.class)
|
||||
.toInstance(new InMemoryRepositoryManager());
|
||||
|
Reference in New Issue
Block a user