diff options
author | Olivier Lamy <olamy@apache.org> | 2011-06-13 22:35:36 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-06-13 22:35:36 +0000 |
commit | c19e95ffc10d84252a33580b5171f16a225409a2 (patch) | |
tree | df8c23223e147fdc17ed124dd831ad74d7e0f478 /archiva-modules | |
parent | 4db8075bc60e3b284a346740140df9c69df6ce61 (diff) | |
download | archiva-c19e95ffc10d84252a33580b5171f16a225409a2.tar.gz archiva-c19e95ffc10d84252a33580b5171f16a225409a2.zip |
fix more tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135332 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java index f89f90717..63b243beb 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java @@ -19,6 +19,7 @@ package org.apache.maven.archiva.web.action.reports; * under the License. */ +import com.google.common.collect.Lists; import com.opensymphony.xwork2.Action; import org.apache.archiva.metadata.model.MetadataFacet; import org.apache.archiva.metadata.repository.MetadataRepository; @@ -28,6 +29,7 @@ import org.apache.archiva.metadata.repository.stats.RepositoryStatistics; import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager; import org.apache.archiva.reports.RepositoryProblemFacet; import org.apache.commons.io.IOUtils; +import org.apache.maven.archiva.security.UserRepositoriesStub; import org.apache.maven.archiva.web.action.AbstractActionTestCase; import org.easymock.MockControl; @@ -75,7 +77,10 @@ public class GenerateReportActionTest //action = (GenerateReportAction) lookup( Action.class, "generateReport" ); - action = (GenerateReportAction) getActionProxy( "/admin/generateReport.action" ).getAction(); + UserRepositoriesStub stub = applicationContext.getBean( "userRepositories", UserRepositoriesStub.class ); + stub.setRepoIds( Lists.<String>newArrayList( "internal", "snapshots" ) ); + + action = (GenerateReportAction) getActionProxy( "/report/generateReport.action" ).getAction(); repositoryStatisticsManagerControl = MockControl.createControl( RepositoryStatisticsManager.class ); repositoryStatisticsManager = (RepositoryStatisticsManager) repositoryStatisticsManagerControl.getMock(); |