From a7bf8292c3a3b1951bd07fa9337fbb3394426f5e Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 26 Oct 2007 16:10:59 +0000 Subject: [PATCH] Updating test cases for ManagedRepositories to not set RoleManager via plexus (to aide in upgrade of redback) /me runs to the edge of the ring and tags Jesse. git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@588696 13f79535-47bb-0310-9956-ffa450edef68 --- ...tractManagedRepositoryArchivaDAOStub.java} | 4 +- .../AddManagedRepositoryActionTest.java | 8 +- .../DeleteManagedRepositoryActionTest.java | 6 ++ .../EditManagedRepositoryActionTest.java | 6 ++ .../AbstractManagedRepositoriesActionTest.xml | 98 +++++++++++++++++++ .../DeleteManagedRepositoryActionTest.xml | 5 + 6 files changed, 124 insertions(+), 3 deletions(-) rename archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/{DeleteManagedRepositoryArchivaDAOStub.java => AbstractManagedRepositoryArchivaDAOStub.java} (96%) create mode 100644 archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryArchivaDAOStub.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java similarity index 96% rename from archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryArchivaDAOStub.java rename to archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java index d48ccc455..81c1b76bd 100644 --- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryArchivaDAOStub.java +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoryArchivaDAOStub.java @@ -30,12 +30,12 @@ import org.apache.maven.archiva.database.RepositoryProblemDAO; import org.apache.maven.archiva.database.SimpleConstraint; /** - * DeleteManagedRepositoryArchivaDAOStub + * AbstractManagedRepositoryArchivaDAOStub * * @author Maria Odea Ching * @version */ -public class DeleteManagedRepositoryArchivaDAOStub +public class AbstractManagedRepositoryArchivaDAOStub implements ArchivaDAO { /** diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java index 779ad630e..8a870cc5c 100644 --- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java @@ -57,7 +57,13 @@ public class AddManagedRepositoryActionTest private static final String REPO_ID = "repo-ident"; private File location; - + + @Override + protected String getCustomConfigurationName() + { + return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml"; + } + protected void setUp() throws Exception { diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java index 95f25df2b..c0582812c 100644 --- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java @@ -66,6 +66,12 @@ public class DeleteManagedRepositoryActionTest private File location; + @Override + protected String getCustomConfigurationName() + { + return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml"; + } + protected void setUp() throws Exception { diff --git a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java index f596f42b7..407ffd710 100644 --- a/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java +++ b/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java @@ -57,6 +57,12 @@ public class EditManagedRepositoryActionTest private File location; + @Override + protected String getCustomConfigurationName() + { + return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml"; + } + protected void setUp() throws Exception { diff --git a/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml new file mode 100644 index 000000000..7273543eb --- /dev/null +++ b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml @@ -0,0 +1,98 @@ + + + + + + org.codehaus.plexus.logging.LoggerManager + org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager + basic + + + + com.opensymphony.xwork.Action + addManagedRepositoryAction + org.apache.maven.archiva.web.action.admin.repositories.AddManagedRepositoryAction + per-lookup + + + + + com.opensymphony.xwork.Action + deleteManagedRepositoryAction + org.apache.maven.archiva.web.action.admin.repositories.DeleteManagedRepositoryAction + per-lookup + + + org.apache.maven.archiva.database.ArchivaDAO + jdo + archivaDAO + + + + + + com.opensymphony.xwork.Action + editManagedRepositoryAction + org.apache.maven.archiva.web.action.admin.repositories.EditManagedRepositoryAction + per-lookup + + + + + + org.apache.maven.archiva.database.ArchivaDAO + jdo + org.apache.maven.archiva.web.action.admin.repositories.AbstractManagedRepositoryArchivaDAOStub + + + org.apache.maven.archiva.database.ArtifactDAO + jdo + artifactDAO + + + org.apache.maven.archiva.database.ProjectModelDAO + jdo + projectModelDAO + + + org.apache.maven.archiva.database.RepositoryContentStatisticsDAO + jdo + repoContentStatisticsDAO + + + + + org.apache.maven.archiva.database.ArtifactDAO + jdo + org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub + + + org.apache.maven.archiva.database.ProjectModelDAO + jdo + org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub + + + org.apache.maven.archiva.database.RepositoryContentStatisticsDAO + jdo + org.apache.maven.archiva.web.action.admin.repositories.RepositoryContentStatisticsDAOStub + + + + diff --git a/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml index c6e35788e..a5891aacc 100644 --- a/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml +++ b/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml @@ -24,6 +24,11 @@ org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager basic + + org.codehaus.plexus.redback.role.RoleManager + default + org.apache.maven.archiva.web.action.admin.repositories.RoleManagerStub + com.opensymphony.xwork.Action deleteManagedRepositoryAction -- 2.39.5