diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-10-26 16:10:59 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-10-26 16:10:59 +0000 |
commit | a7bf8292c3a3b1951bd07fa9337fbb3394426f5e (patch) | |
tree | 234e82e67bd84e206ce2bca631a17594c8a61763 | |
parent | 2395fea5f0b4f821114659ddad502e6e3e319d40 (diff) | |
download | archiva-a7bf8292c3a3b1951bd07fa9337fbb3394426f5e.tar.gz archiva-a7bf8292c3a3b1951bd07fa9337fbb3394426f5e.zip |
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
6 files changed, 124 insertions, 3 deletions
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 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 <a href="mailto:oching@apache.org">Maria Odea Ching</a> * @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 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<plexus> + <components> + <component> + <role>org.codehaus.plexus.logging.LoggerManager</role> + <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation> + <lifecycle-handler>basic</lifecycle-handler> + </component> + + <component> + <role>com.opensymphony.xwork.Action</role> + <role-hint>addManagedRepositoryAction</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.AddManagedRepositoryAction</implementation> + <instantiation-strategy>per-lookup</instantiation-strategy> + <!-- no requirements set --> + </component> + + <component> + <role>com.opensymphony.xwork.Action</role> + <role-hint>deleteManagedRepositoryAction</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.DeleteManagedRepositoryAction</implementation> + <instantiation-strategy>per-lookup</instantiation-strategy> + <requirements> + <requirement> + <role>org.apache.maven.archiva.database.ArchivaDAO</role> + <role-hint>jdo</role-hint> + <field-name>archivaDAO</field-name> + </requirement> + </requirements> + </component> + + <component> + <role>com.opensymphony.xwork.Action</role> + <role-hint>editManagedRepositoryAction</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.EditManagedRepositoryAction</implementation> + <instantiation-strategy>per-lookup</instantiation-strategy> + <!-- no requirements set --> + </component> + + <!-- DAO : Stubs --> + <component> + <role>org.apache.maven.archiva.database.ArchivaDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.AbstractManagedRepositoryArchivaDAOStub</implementation> + <requirements> + <requirement> + <role>org.apache.maven.archiva.database.ArtifactDAO</role> + <role-hint>jdo</role-hint> + <field-name>artifactDAO</field-name> + </requirement> + <requirement> + <role>org.apache.maven.archiva.database.ProjectModelDAO</role> + <role-hint>jdo</role-hint> + <field-name>projectModelDAO</field-name> + </requirement> + <requirement> + <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role> + <role-hint>jdo</role-hint> + <field-name>repoContentStatisticsDAO</field-name> + </requirement> + </requirements> + </component> + <component> + <role>org.apache.maven.archiva.database.ArtifactDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.ArtifactDAOStub</implementation> + </component> + <component> + <role>org.apache.maven.archiva.database.ProjectModelDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.ProjectModelDAOStub</implementation> + </component> + <component> + <role>org.apache.maven.archiva.database.RepositoryContentStatisticsDAO</role> + <role-hint>jdo</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.RepositoryContentStatisticsDAOStub</implementation> + </component> + + </components> +</plexus> 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 @@ -25,6 +25,11 @@ <lifecycle-handler>basic</lifecycle-handler> </component> <component> + <role>org.codehaus.plexus.redback.role.RoleManager</role> + <role-hint>default</role-hint> + <implementation>org.apache.maven.archiva.web.action.admin.repositories.RoleManagerStub</implementation> + </component> + <component> <role>com.opensymphony.xwork.Action</role> <role-hint>deleteManagedRepositoryAction</role-hint> <implementation>org.apache.maven.archiva.web.action.admin.repositories.DeleteManagedRepositoryAction</implementation> |