diff options
author | Olivier Lamy <olamy@apache.org> | 2011-09-01 16:42:17 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-09-01 16:42:17 +0000 |
commit | e6ce81d425e454f082ff37c547503c07233ab68e (patch) | |
tree | 66222707596c3f814f664cea994a7f4db84944a4 | |
parent | 9be7bece75896d38a4c690a3d057acd0020f21fb (diff) | |
download | archiva-e6ce81d425e454f082ff37c547503c07233ab68e.tar.gz archiva-e6ce81d425e454f082ff37c547503c07233ab68e.zip |
add unit for issue fixed in the previous commit
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1164151 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java | 15 | ||||
-rw-r--r-- | pom.xml | 3 |
2 files changed, 13 insertions, 5 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java b/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java index aec3002b6..551572612 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/src/test/java/org/apache/archiva/admin/repository/managed/ManagedRepositoryAdminTest.java @@ -258,10 +258,8 @@ public class ManagedRepositoryAdminTest int initialSize = repos.size(); assertTrue( initialSize > 0 ); - ManagedRepository repo = new ManagedRepository(); - repo.setId( repoId ); - repo.setName( "test repo" ); - repo.setLocation( repoLocation ); + ManagedRepository repo = getTestManagedRepository( repoId, repoLocation ); + managedRepositoryAdmin.addManagedRepository( repo, false, getFakeAuditInformation() ); assertTemplateRoleExists( repoId ); @@ -287,7 +285,9 @@ public class ManagedRepositoryAdminTest assertEquals( newName, repo.getName() ); assertEquals( new File( repoLocation ).getCanonicalPath(), new File( repo.getLocation() ).getCanonicalPath() ); assertTrue( new File( repoLocation ).exists() ); - + assertEquals( getTestManagedRepository( repoId, repoLocation ).getCronExpression(), repo.getCronExpression() ); + assertEquals( getTestManagedRepository( repoId, repoLocation ).getLayout(), repo.getLayout() ); + assertEquals( getTestManagedRepository( repoId, repoLocation ).getId(), repo.getId() ); assertTemplateRoleExists( repoId ); assertTrue( new File( stageRepoLocation + STAGE_REPO_ID_END ).exists() ); @@ -418,4 +418,9 @@ public class ManagedRepositoryAdminTest return user; } + ManagedRepository getTestManagedRepository( String repoId, String repoLocation ) + { + return new ManagedRepository( repoId, "test repo", repoLocation, "default", false, true, true, "0 0 * * * ?" ); + } + } @@ -1614,6 +1614,8 @@ </repository> </repositories> </profile> + <!-- + jrebel tests doesn't work very well : too investigate <profile> <id>jrebel</id> <build> @@ -1635,5 +1637,6 @@ </plugins> </build> </profile> + --> </profiles> </project> |