From 98f74f984a973944824a1be52768a7437f2ad625 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Tue, 14 Jun 2011 14:15:52 +0000 Subject: [PATCH] fix SortProxyConnectorsActionTest git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135589 13f79535-47bb-0310-9956-ffa450edef68 --- .../proxy/SortProxyConnectorsActionTest.java | 2 +- .../web/action/reports/GenerateReportActionTest.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java index 913fda171..bb0d3ac0c 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java @@ -243,7 +243,7 @@ public class SortProxyConnectorsActionTest super.setUp(); //action = (SortProxyConnectorsAction) lookup( Action.class.getName(), "sortProxyConnectorsAction" ); - action = (SortProxyConnectorsAction) getActionProxy( "/admin/sortProxyConnectors.action" ).getAction(); + action = (SortProxyConnectorsAction) getActionProxy( "/admin/sortUpProxyConnector.action" ).getAction(); archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class ); archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock(); 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 63b243beb..c1144c2a9 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 @@ -32,6 +32,7 @@ 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; +import org.junit.After; import java.io.IOException; import java.util.ArrayList; @@ -98,6 +99,16 @@ public class GenerateReportActionTest factory.setRepositorySession( repositorySession ); } + @After + public void tearDown() + throws Exception + { + UserRepositoriesStub stub = applicationContext.getBean( "userRepositories", UserRepositoriesStub.class ); + stub.setRepoIds( Lists.newArrayList( "test-repo" ) ); + super.tearDown(); + + } + private void prepareAction( List selectedRepositories, List availableRepositories ) { action.setSelectedRepositories( selectedRepositories ); -- 2.39.5