]> source.dussan.org Git - archiva.git/commitdiff
fix more unit tests
authorOlivier Lamy <olamy@apache.org>
Mon, 13 Jun 2011 22:23:14 +0000 (22:23 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 13 Jun 2011 22:23:14 +0000 (22:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135325 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/rss/RssFeedServlet.java
archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/admin/repositories/SortRepositoriesActionTest.java
archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/feedServletTest-web.xml
archiva-modules/archiva-web/archiva-webapp/src/test/webapp/WEB-INF/web.xml

index 2dbb22fe8ce70251411447c752b1d71fbc3e6e78..07c08e7015fb00247cadd80ed7e1ee390aef877c 100644 (file)
@@ -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 )
index 73677e1186089ab4eae0581293d471fa2e880793..c0ccdc85409bd13672738137d76764064072873b 100644 (file)
@@ -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 );
index 7741913b29ba0d8046fde00221677ada3c544592..05844746608566fae1236f8d274ad8ad07d4acb6 100644 (file)
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
 
+  <context-param>
+    <param-name>contextClass</param-name>
+    <param-value>org.codehaus.redback.components.springutils.CachingWebApplicationContext</param-value>
+  </context-param>
+
   <servlet>
-       <servlet-name>RssFeedServlet</servlet-name>
-       <servlet-class>org.apache.maven.archiva.web.rss.RssFeedServlet</servlet-class>
+    <servlet-name>RssFeedServlet</servlet-name>
+    <servlet-class>org.apache.maven.archiva.web.rss.RssFeedServlet</servlet-class>
   </servlet>
 
   <servlet-mapping>
-       <servlet-name>RssFeedServlet</servlet-name>
-       <url-pattern>/feeds/*</url-pattern>
+    <servlet-name>RssFeedServlet</servlet-name>
+    <url-pattern>/feeds/*</url-pattern>
   </servlet-mapping>
 
 
-   <context-param>
+  <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
-        classpath*:/spring-context.xml
-        classpath*:/META-INF/spring-context.xml
+      classpath*:/spring-context.xml
+      classpath*:/META-INF/spring-context.xml
     </param-value>
   </context-param>
 
index 7df481abd613b9ab2db805c1b20a10161a09883f..e9982ea1deca2bcfab29bc8ecbcc8a1ba56a5c39 100644 (file)
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
 
-   <context-param>
+  <context-param>
+    <param-name>contextClass</param-name>
+    <param-value>org.codehaus.redback.components.springutils.CachingWebApplicationContext</param-value>
+  </context-param>
+
+  <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
-        classpath*:/spring-context.xml
-        classpath*:/META-INF/spring-context.xml
+      classpath*:/spring-context.xml
+      classpath*:/META-INF/spring-context.xml
     </param-value>
   </context-param>