Skip to content

Commit d2d206c

Browse files
author
Vladimir Kotal
committed
split the tests
1 parent 64788ca commit d2d206c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

opengrok-web/src/test/java/org/opengrok/web/api/v1/controller/ProjectsControllerTest.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ public void testList() {
438438
}
439439

440440
@Test
441-
public void testGetRepos() throws Exception {
441+
public void testGetReposForNonExistentProject() throws Exception {
442442
GenericType<List<String>> type = new GenericType<List<String>>() {};
443443

444444
// Try to get repos for non-existent project first.
@@ -449,6 +449,11 @@ public void testGetRepos() throws Exception {
449449
.get(type);
450450

451451
assertTrue(repos.isEmpty());
452+
}
453+
454+
@Test
455+
public void testGetRepos() throws Exception {
456+
GenericType<List<String>> type = new GenericType<List<String>>() {};
452457

453458
// Create subrepository.
454459
File mercurialRoot = new File(repository.getSourceRoot() + File.separator + "mercurial");
@@ -459,13 +464,13 @@ public void testGetRepos() throws Exception {
459464
addProject("mercurial");
460465

461466
// Get repositories of the project.
462-
repos = target("projects")
467+
List<String> repos = target("projects")
463468
.path("mercurial")
464469
.path("repositories")
465470
.request()
466471
.get(type);
467472

468-
// Perform cleanup of the subrepository in order not to interefere
473+
// Perform cleanup of the subrepository in order not to interfere
469474
// with other tests.
470475
removeRecursive(new File(mercurialRoot.getAbsolutePath() +
471476
File.separator + "closed").toPath());

0 commit comments

Comments
 (0)