o fixed failing tests due to bean lookup errors git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1296@890982 13f79535-47bb-0310-9956-ffa450edef68MRM-1296
@@ -59,8 +59,8 @@ public abstract class PlexusActionSupport | |||
/** | |||
* @plexus.requirement role-hint="jdo" | |||
*/ | |||
private ArchivaAuditLogsDao auditLogsDao; | |||
private ArchivaAuditLogsDao auditLogsDao; | |||
private String principal; | |||
@SuppressWarnings("unchecked") | |||
@@ -146,4 +146,9 @@ public abstract class PlexusActionSupport | |||
{ | |||
this.principal = principal; | |||
} | |||
public void setAuditLogsDao( ArchivaAuditLogsDao auditLogsDao ) | |||
{ | |||
this.auditLogsDao = auditLogsDao; | |||
} | |||
} |
@@ -31,6 +31,8 @@ import org.apache.maven.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.RepositoryScanningConfiguration; | |||
import org.apache.maven.archiva.database.ArchivaAuditLogsDao; | |||
import org.apache.maven.archiva.model.ArchivaAuditLogs; | |||
import org.apache.maven.archiva.repository.ManagedRepositoryContent; | |||
import org.apache.maven.archiva.repository.RepositoryContentFactory; | |||
import org.apache.maven.archiva.repository.RepositoryNotFoundException; | |||
@@ -62,10 +64,14 @@ public class UploadActionTest | |||
private RepositoryContentFactory repoFactory; | |||
private MockControl repoFactoryControl; | |||
private ArchivaAuditLogsDao auditLogsDao; | |||
private MockControl auditLogsDaoControl; | |||
private static final String REPOSITORY_ID = "test-repo"; | |||
private Configuration config; | |||
private Configuration config; | |||
public void setUp() | |||
throws Exception | |||
@@ -80,11 +86,16 @@ public class UploadActionTest | |||
repoFactoryControl = MockClassControl.createControl( RepositoryContentFactory.class ); | |||
repoFactory = (RepositoryContentFactory) repoFactoryControl.getMock(); | |||
auditLogsDaoControl = MockControl.createControl( ArchivaAuditLogsDao.class ); | |||
auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER ); | |||
auditLogsDao = (ArchivaAuditLogsDao) auditLogsDaoControl.getMock(); | |||
uploadAction = new UploadAction(); | |||
uploadAction.setScheduler( scheduler ); | |||
uploadAction.setConfiguration( archivaConfig ); | |||
uploadAction.setRepositoryFactory( repoFactory ); | |||
uploadAction.setAuditLogsDao( auditLogsDao ); | |||
File testRepo = new File( getBasedir(), "target/test-classes/test-repo" ); | |||
testRepo.mkdirs(); | |||
@@ -216,16 +227,19 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation ); | |||
@@ -245,15 +259,18 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertTrue( new File( repoLocation, "/org/apache/archiva/artifact-upload/1.0/artifact-upload-1.0-tests.jar" ).exists() ); | |||
@@ -319,15 +336,18 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation ); | |||
@@ -377,15 +397,18 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertEquals( 6, new File( repoLocation, "/org/apache/archiva/artifact-upload/1.0-SNAPSHOT/" ).list().length ); | |||
@@ -412,18 +435,23 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
archivaConfigControl.reset(); | |||
repoFactoryControl.reset(); | |||
auditLogsDaoControl.reset(); | |||
auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER ); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation ); | |||
@@ -438,15 +466,18 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation ); | |||
@@ -467,9 +498,11 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config, 2 ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content, 2 ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
@@ -484,6 +517,7 @@ public class UploadActionTest | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation ); | |||
@@ -506,9 +540,11 @@ public class UploadActionTest | |||
archivaConfigControl.expectAndReturn( archivaConfig.getConfiguration(), config, 2 ); | |||
repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content, 2 ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null, 2 ); | |||
archivaConfigControl.replay(); | |||
repoFactoryControl.replay(); | |||
auditLogsDaoControl.replay(); | |||
String returnString = uploadAction.doUpload(); | |||
assertEquals( Action.SUCCESS, returnString ); | |||
@@ -523,6 +559,7 @@ public class UploadActionTest | |||
archivaConfigControl.verify(); | |||
repoFactoryControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
String repoLocation = config.findManagedRepositoryById( REPOSITORY_ID ).getLocation(); | |||
assertAllArtifactsIncludingSupportArtifactsArePresent( repoLocation ); |
@@ -40,7 +40,7 @@ public class DisableProxyConnectorActionTest extends AbstractWebworkTestCase | |||
private MockControl archivaConfigurationControl; | |||
private ArchivaConfiguration archivaConfiguration; | |||
public void testConfirmDisableBadSourceOrTarget() | |||
throws Exception | |||
{ |
@@ -24,6 +24,8 @@ import org.apache.commons.io.FileUtils; | |||
import org.apache.maven.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.maven.archiva.database.ArchivaAuditLogsDao; | |||
import org.apache.maven.archiva.model.ArchivaAuditLogs; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.redback.role.RoleManager; | |||
import org.codehaus.redback.integration.interceptor.SecureActionBundle; | |||
@@ -51,6 +53,10 @@ public class AddManagedRepositoryActionTest | |||
private MockControl archivaConfigurationControl; | |||
private ArchivaConfiguration archivaConfiguration; | |||
private ArchivaAuditLogsDao auditLogsDao; | |||
private MockControl auditLogsDaoControl; | |||
private static final String REPO_ID = "repo-ident"; | |||
@@ -74,6 +80,11 @@ public class AddManagedRepositoryActionTest | |||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock(); | |||
action.setArchivaConfiguration( archivaConfiguration ); | |||
auditLogsDaoControl = MockControl.createControl( ArchivaAuditLogsDao.class ); | |||
auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER ); | |||
auditLogsDao = (ArchivaAuditLogsDao) auditLogsDaoControl.getMock(); | |||
action.setAuditLogsDao( auditLogsDao ); | |||
roleManagerControl = MockControl.createControl( RoleManager.class ); | |||
roleManager = (RoleManager) roleManagerControl.getMock(); | |||
action.setRoleManager( roleManager ); | |||
@@ -148,15 +159,18 @@ public class AddManagedRepositoryActionTest | |||
ManagedRepositoryConfiguration repository = action.getRepository(); | |||
populateRepository( repository ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
assertFalse( location.exists() ); | |||
String status = action.commit(); | |||
assertEquals( Action.SUCCESS, status ); | |||
assertTrue( location.exists() ); | |||
assertTrue( location.exists() ); | |||
assertEquals( Collections.singletonList( repository ), configuration.getManagedRepositories() ); | |||
roleManagerControl.verify(); | |||
archivaConfigurationControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
} | |||
@@ -0,0 +1,34 @@ | |||
package org.apache.maven.archiva.web.action.admin.repositories; | |||
import java.util.List; | |||
import org.apache.maven.archiva.database.ArchivaAuditLogsDao; | |||
import org.apache.maven.archiva.database.ArchivaDatabaseException; | |||
import org.apache.maven.archiva.database.Constraint; | |||
import org.apache.maven.archiva.database.ObjectNotFoundException; | |||
import org.apache.maven.archiva.model.ArchivaAuditLogs; | |||
public class ArchivaAuditLogsDaoStub | |||
implements ArchivaAuditLogsDao | |||
{ | |||
public void deleteAuditLogs( ArchivaAuditLogs logs ) | |||
throws ArchivaDatabaseException | |||
{ | |||
// TODO Auto-generated method stub | |||
} | |||
public List<ArchivaAuditLogs> queryAuditLogs( Constraint constraint ) | |||
throws ObjectNotFoundException, ArchivaDatabaseException | |||
{ | |||
// TODO Auto-generated method stub | |||
return null; | |||
} | |||
public ArchivaAuditLogs saveAuditLogs( ArchivaAuditLogs logs ) | |||
{ | |||
// TODO Auto-generated method stub | |||
return null; | |||
} | |||
} |
@@ -27,6 +27,8 @@ import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration; | |||
import org.apache.maven.archiva.configuration.RemoteRepositoryConfiguration; | |||
import org.apache.maven.archiva.configuration.RepositoryGroupConfiguration; | |||
import org.apache.maven.archiva.database.ArchivaAuditLogsDao; | |||
import org.apache.maven.archiva.model.ArchivaAuditLogs; | |||
import org.apache.maven.archiva.model.ArchivaProjectModel; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.redback.role.RoleManager; | |||
@@ -60,6 +62,10 @@ public class DeleteManagedRepositoryActionTest | |||
private ArchivaConfiguration archivaConfiguration; | |||
private ArchivaAuditLogsDao auditLogsDao; | |||
private MockControl auditLogsDaoControl; | |||
private static final String REPO_ID = "repo-ident"; | |||
private File location; | |||
@@ -80,6 +86,11 @@ public class DeleteManagedRepositoryActionTest | |||
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class ); | |||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock(); | |||
action.setArchivaConfiguration( archivaConfiguration ); | |||
auditLogsDaoControl = MockControl.createControl( ArchivaAuditLogsDao.class ); | |||
auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER ); | |||
auditLogsDao = (ArchivaAuditLogsDao) auditLogsDaoControl.getMock(); | |||
action.setAuditLogsDao( auditLogsDao ); | |||
roleManagerControl = MockControl.createControl( RoleManager.class ); | |||
roleManager = (RoleManager) roleManagerControl.getMock(); | |||
@@ -117,9 +128,10 @@ public class DeleteManagedRepositoryActionTest | |||
ManagedRepositoryConfiguration repository = action.getRepository(); | |||
assertNotNull( repository ); | |||
assertRepositoryEquals( repository, createRepository() ); | |||
String status = action.execute(); | |||
assertEquals( Action.SUCCESS, status ); | |||
repository = action.getRepository(); | |||
assertRepositoryEquals( repository, createRepository() ); | |||
assertEquals( Collections.singletonList( originalRepository ), configuration.getManagedRepositories() ); | |||
@@ -132,8 +144,13 @@ public class DeleteManagedRepositoryActionTest | |||
Configuration configuration = prepDeletionTest( createRepository(), 4 ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
String status = action.deleteEntry(); | |||
auditLogsDaoControl.verify(); | |||
assertEquals( Action.SUCCESS, status ); | |||
assertTrue( configuration.getManagedRepositories().isEmpty() ); | |||
@@ -148,7 +165,12 @@ public class DeleteManagedRepositoryActionTest | |||
Configuration configuration = prepDeletionTest( createRepository(), 4 ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
String status = action.deleteContents(); | |||
auditLogsDaoControl.verify(); | |||
assertEquals( Action.SUCCESS, status ); | |||
@@ -169,7 +191,12 @@ public class DeleteManagedRepositoryActionTest | |||
assertEquals( 1, configuration.getProxyConnectors().size() ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
String status = action.deleteContents(); | |||
auditLogsDaoControl.verify(); | |||
assertEquals( Action.SUCCESS, status ); | |||
assertTrue( configuration.getManagedRepositories().isEmpty() ); | |||
@@ -183,6 +210,7 @@ public class DeleteManagedRepositoryActionTest | |||
{ | |||
ManagedRepositoryConfiguration originalRepository = createRepository(); | |||
Configuration configuration = prepDeletionTest( originalRepository, 3 ); | |||
String status = action.execute(); | |||
assertEquals( Action.SUCCESS, status ); | |||
@@ -205,8 +233,12 @@ public class DeleteManagedRepositoryActionTest | |||
assertEquals( 1, configuration.getRepositoryGroups().size() ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
String status = action.deleteContents(); | |||
assertEquals( Action.SUCCESS, status ); | |||
auditLogsDaoControl.verify(); | |||
assertTrue( configuration.getManagedRepositories().isEmpty() ); | |||
assertEquals( 0, ( ( RepositoryGroupConfiguration ) configuration.getRepositoryGroups().get( 0 ) ).getRepositories().size() ); |
@@ -23,9 +23,11 @@ import com.opensymphony.xwork2.Action; | |||
import org.apache.maven.archiva.configuration.ArchivaConfiguration; | |||
import org.apache.maven.archiva.configuration.Configuration; | |||
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration; | |||
import org.apache.maven.archiva.database.ArchivaAuditLogsDao; | |||
import org.apache.maven.archiva.database.ArchivaDAO; | |||
import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO; | |||
import org.apache.maven.archiva.database.constraints.RepositoryContentStatisticsByRepositoryConstraint; | |||
import org.apache.maven.archiva.model.ArchivaAuditLogs; | |||
import org.apache.maven.archiva.model.RepositoryContentStatistics; | |||
import org.apache.maven.archiva.security.ArchivaRoleConstants; | |||
import org.codehaus.plexus.redback.role.RoleManager; | |||
@@ -66,6 +68,10 @@ public class EditManagedRepositoryActionTest | |||
private MockControl repoContentStatsDaoControl; | |||
private RepositoryContentStatisticsDAO repoContentStatsDao; | |||
private ArchivaAuditLogsDao auditLogsDao; | |||
private MockControl auditLogsDaoControl; | |||
private static final String REPO_ID = "repo-ident"; | |||
@@ -96,6 +102,11 @@ public class EditManagedRepositoryActionTest | |||
archivaDaoControl = MockControl.createControl( ArchivaDAO.class ); | |||
archivaDao = (ArchivaDAO) archivaDaoControl.getMock(); | |||
action.setArchivaDAO( archivaDao ); | |||
auditLogsDaoControl = MockControl.createControl( ArchivaAuditLogsDao.class ); | |||
auditLogsDaoControl.setDefaultMatcher( MockControl.ALWAYS_MATCHER ); | |||
auditLogsDao = (ArchivaAuditLogsDao) auditLogsDaoControl.getMock(); | |||
action.setAuditLogsDao( auditLogsDao ); | |||
repoContentStatsDaoControl = MockControl.createControl( RepositoryContentStatisticsDAO.class ); | |||
repoContentStatsDao = (RepositoryContentStatisticsDAO) repoContentStatsDaoControl.getMock(); | |||
@@ -167,10 +178,13 @@ public class EditManagedRepositoryActionTest | |||
ManagedRepositoryConfiguration repository = action.getRepository(); | |||
populateRepository( repository ); | |||
repository.setName( "new repo name" ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
String status = action.commit(); | |||
assertEquals( Action.SUCCESS, status ); | |||
ManagedRepositoryConfiguration newRepository = createRepository(); | |||
newRepository.setName( "new repo name" ); | |||
assertRepositoryEquals( repository, newRepository ); | |||
@@ -178,6 +192,7 @@ public class EditManagedRepositoryActionTest | |||
roleManagerControl.verify(); | |||
archivaConfigurationControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
} | |||
public void testEditRepositoryLocationChanged() | |||
@@ -226,6 +241,9 @@ public class EditManagedRepositoryActionTest | |||
action.prepare(); | |||
assertEquals( REPO_ID, action.getRepoid() ); | |||
auditLogsDaoControl.expectAndReturn( auditLogsDao.saveAuditLogs( new ArchivaAuditLogs() ), null ); | |||
auditLogsDaoControl.replay(); | |||
ManagedRepositoryConfiguration repository = new ManagedRepositoryConfiguration(); | |||
populateRepository( repository ); | |||
repository.setLocation( new File( "target/test/location/new" ).getCanonicalPath() ); | |||
@@ -238,6 +256,7 @@ public class EditManagedRepositoryActionTest | |||
archivaConfigurationControl.verify(); | |||
archivaDaoControl.verify(); | |||
repoContentStatsDaoControl.verify(); | |||
auditLogsDaoControl.verify(); | |||
} | |||
private void assertRepositoryEquals( ManagedRepositoryConfiguration expectedRepository, |
@@ -35,5 +35,10 @@ | |||
<role-hint>default</role-hint> | |||
<implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -35,5 +35,10 @@ | |||
<role-hint>default</role-hint> | |||
<implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -39,6 +39,10 @@ | |||
<time-to-live-seconds>1800</time-to-live-seconds> | |||
</configuration> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -38,7 +38,11 @@ | |||
<!-- 30 minutes = 1800 seconds --> | |||
<time-to-live-seconds>1800</time-to-live-seconds> | |||
</configuration> | |||
</component> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -86,7 +86,11 @@ | |||
<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> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -73,6 +73,11 @@ | |||
<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> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -48,5 +48,10 @@ | |||
</requirement> | |||
</requirements> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -0,0 +1,28 @@ | |||
<!-- | |||
~ 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.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |
@@ -37,5 +37,10 @@ | |||
<role-hint>default</role-hint> | |||
<implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation> | |||
</component> | |||
<component> | |||
<role>org.apache.maven.archiva.database.ArchivaAuditLogsDao</role> | |||
<role-hint>jdo</role-hint> | |||
<implementation>org.apache.maven.archiva.web.action.admin.repositories.ArchivaAuditLogsDaoStub</implementation> | |||
</component> | |||
</components> | |||
</plexus> |