]> source.dussan.org Git - archiva.git/commitdiff
fix SortProxyConnectorsActionTest
authorOlivier Lamy <olamy@apache.org>
Tue, 14 Jun 2011 14:15:52 +0000 (14:15 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 14 Jun 2011 14:15:52 +0000 (14:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135589 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/SortProxyConnectorsActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java

index 913fda1719bad00dfc05d88b4fea06035925eb09..bb0d3ac0c8a0362ddb4f36e654c868273fe6e0b4 100644 (file)
@@ -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();
index 63b243bebf324b084f05fd2f90fc59140eec4e59..c1144c2a98778e53b6f67064eda4ecad952a145d 100644 (file)
@@ -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.<String>newArrayList( "test-repo" ) );
+        super.tearDown();
+
+    }
+
     private void prepareAction( List<String> selectedRepositories, List<String> availableRepositories )
     {
         action.setSelectedRepositories( selectedRepositories );