diff options
author | Maria Odea B. Ching <oching@apache.org> | 2009-12-15 20:48:24 +0000 |
---|---|---|
committer | Maria Odea B. Ching <oching@apache.org> | 2009-12-15 20:48:24 +0000 |
commit | 56c76e75719f3ee111132f8cf8be2384c099466e (patch) | |
tree | 02c9196d4d488d3f835baa0feb28779ccfd53e8d | |
parent | f1d764f0f549123d683980b43b08782d00e89392 (diff) | |
download | archiva-56c76e75719f3ee111132f8cf8be2384c099466e.tar.gz archiva-56c76e75719f3ee111132f8cf8be2384c099466e.zip |
[MRM-1296] Audit Log Report
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-ffa450edef68
29 files changed, 591 insertions, 21 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java index c936965aa..ad1d38875 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java @@ -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;
+ }
}
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/UploadActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/UploadActionTest.java index f86660c56..1af6eda88 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/UploadActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/UploadActionTest.java @@ -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 ); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java index b510a144d..becbd156e 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.java @@ -40,7 +40,7 @@ public class DisableProxyConnectorActionTest extends AbstractWebworkTestCase private MockControl archivaConfigurationControl; private ArchivaConfiguration archivaConfiguration; - + public void testConfirmDisableBadSourceOrTarget() throws Exception { diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java index 5ef78ba39..7accb4b7c 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/AddManagedRepositoryActionTest.java @@ -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(); } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaAuditLogsDaoStub.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaAuditLogsDaoStub.java new file mode 100644 index 000000000..933aeb1c9 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/ArchivaAuditLogsDaoStub.java @@ -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; + } + +} diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java index 8d8c4b2b9..ccd69f49f 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.java @@ -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() ); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java index e688f8a29..6f9bdf162 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java @@ -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, diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/BrowseActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/BrowseActionTest.xml index cccf675cb..bb19ef4c1 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/BrowseActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/BrowseActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/SharedComponentsTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/SharedComponentsTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/SharedComponentsTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml index d51572b7f..ecd72a3ae 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/appearance/EditOrganizationInfoActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/appearance/EditOrganizationInfoActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/appearance/EditOrganizationInfoActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/appearance/OrganizationInfoActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/appearance/OrganizationInfoActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/appearance/OrganizationInfoActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml index dc32d3f3d..4ae525c16 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/DeleteProxyConnectorActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/DisableProxyConnectorActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml index dc32d3f3d..a0b969b58 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EnableProxyConnectorActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/ProxyConnectorsActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml index afb64ee15..673e760e8 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AddRemoteRepositoryActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml index f4d20ee61..0a8e9e743 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteRemoteRepositoryActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml index c09e524a2..cac84b952 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.xml new file mode 100644 index 000000000..62b568bd8 --- /dev/null +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.xml @@ -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> diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml index 0fec42f00..bb6632ca2 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml @@ -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> |