File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
test/org/opensolaris/opengrok/configuration/messages Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -394,21 +394,28 @@ public void testList() throws Exception {
394
394
395
395
@ Test
396
396
public void testGetRepos () throws Exception {
397
+ // Try to get repos for non-existent project first.
398
+ Message m = new ProjectMessage ();
399
+ m .setText ("get-repos" );
400
+ m .addTag ("totally-nonexistent-project" );
401
+ String out = new String (m .apply (env ));
402
+ Assert .assertEquals ("" , out );
403
+
397
404
// Create subrepository.
398
405
File mercurialRoot = new File (repository .getSourceRoot () + File .separator + "mercurial" );
399
406
MercurialRepositoryTest .runHgCommand (mercurialRoot ,
400
407
"clone" , mercurialRoot .getAbsolutePath (),
401
408
mercurialRoot .getAbsolutePath () + File .separator + "closed" );
402
409
403
410
// Add a project
404
- Message m = new ProjectMessage ();
411
+ m = new ProjectMessage ();
405
412
m .setText ("add" );
406
413
m .addTag ("mercurial" );
407
414
m .apply (env );
408
415
409
416
// Get repositories of the project.
410
417
m .setText ("get-repos" );
411
- String out = new String (m .apply (env ));
418
+ out = new String (m .apply (env ));
412
419
413
420
// Perform cleanup of the subrepository in order not to interefere
414
421
// with other tests.
You can’t perform that action at this time.
0 commit comments