From: Olivier Lamy Date: Mon, 13 Jun 2011 22:23:14 +0000 (+0000) Subject: fix more unit tests X-Git-Tag: archiva-1.4-M1~651 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=44629e35f6631c37f7f8b8356f5045388397f121;p=archiva.git fix more unit tests git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135325 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java index 2dbb22fe8..07c08e701 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java @@ -98,7 +98,7 @@ public class RssFeedServlet servletAuth = wac.getBean( ServletAuthenticator.class ); httpAuth = wac.getBean( "httpAuthenticator#basic", HttpAuthenticator.class ); // TODO: what if there are other types? - repositorySessionFactory = wac.getBean( RepositorySessionFactory.class ); + repositorySessionFactory = wac.getBean( "repositorySessionFactory", RepositorySessionFactory.class ); } public void doGet( HttpServletRequest req, HttpServletResponse res ) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java index 73677e118..c0ccdc854 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java @@ -64,7 +64,7 @@ public class SortRepositoriesActionTest //action = (SortRepositoriesAction) lookup( Action.class.getName(), "sortRepositoriesAction" ); - action = (SortRepositoriesAction) getActionProxy( "sortDownRepositoryFromGroup.action" ).getAction(); + action = (SortRepositoriesAction) getActionProxy( "/admin/sortDownRepositoryFromGroup.action" ).getAction(); archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class ); archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock(); action.setArchivaConfiguration( archivaConfiguration ); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml index 7741913b2..058447466 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml @@ -28,22 +28,27 @@ org.springframework.web.context.ContextLoaderListener + + contextClass + org.codehaus.redback.components.springutils.CachingWebApplicationContext + + - RssFeedServlet - org.apache.maven.archiva.web.rss.RssFeedServlet + RssFeedServlet + org.apache.maven.archiva.web.rss.RssFeedServlet - RssFeedServlet - /feeds/* + RssFeedServlet + /feeds/* - + contextConfigLocation - classpath*:/spring-context.xml - classpath*:/META-INF/spring-context.xml + classpath*:/spring-context.xml + classpath*:/META-INF/spring-context.xml diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/web.xml index 7df481abd..e9982ea1d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/web.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/web.xml @@ -28,11 +28,16 @@ org.springframework.web.context.ContextLoaderListener - + + contextClass + org.codehaus.redback.components.springutils.CachingWebApplicationContext + + + contextConfigLocation - classpath*:/spring-context.xml - classpath*:/META-INF/spring-context.xml + classpath*:/spring-context.xml + classpath*:/META-INF/spring-context.xml