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
This commit is contained in:
Joakim Erdfelt 2007-10-26 16:10:59 +00:00
parent 2395fea5f0
commit a7bf8292c3
6 changed files with 124 additions and 3 deletions

View File

@ -30,12 +30,12 @@ import org.apache.maven.archiva.database.RepositoryProblemDAO;
import org.apache.maven.archiva.database.SimpleConstraint; import org.apache.maven.archiva.database.SimpleConstraint;
/** /**
* DeleteManagedRepositoryArchivaDAOStub * AbstractManagedRepositoryArchivaDAOStub
* *
* @author <a href="mailto:oching@apache.org">Maria Odea Ching</a> * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
* @version * @version
*/ */
public class DeleteManagedRepositoryArchivaDAOStub public class AbstractManagedRepositoryArchivaDAOStub
implements ArchivaDAO implements ArchivaDAO
{ {
/** /**

View File

@ -57,7 +57,13 @@ public class AddManagedRepositoryActionTest
private static final String REPO_ID = "repo-ident"; private static final String REPO_ID = "repo-ident";
private File location; private File location;
@Override
protected String getCustomConfigurationName()
{
return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml";
}
protected void setUp() protected void setUp()
throws Exception throws Exception
{ {

View File

@ -66,6 +66,12 @@ public class DeleteManagedRepositoryActionTest
private File location; private File location;
@Override
protected String getCustomConfigurationName()
{
return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml";
}
protected void setUp() protected void setUp()
throws Exception throws Exception
{ {

View File

@ -57,6 +57,12 @@ public class EditManagedRepositoryActionTest
private File location; private File location;
@Override
protected String getCustomConfigurationName()
{
return AbstractManagedRepositoriesAction.class.getName().replace( '.', '/' ) + "Test.xml";
}
protected void setUp() protected void setUp()
throws Exception throws Exception
{ {

View File

@ -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>

View File

@ -24,6 +24,11 @@
<implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation> <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
<lifecycle-handler>basic</lifecycle-handler> <lifecycle-handler>basic</lifecycle-handler>
</component> </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> <component>
<role>com.opensymphony.xwork.Action</role> <role>com.opensymphony.xwork.Action</role>
<role-hint>deleteManagedRepositoryAction</role-hint> <role-hint>deleteManagedRepositoryAction</role-hint>