]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1145] RSS tests do not correctly check responses
authorOlivier Lamy <olamy@apache.org>
Tue, 14 Oct 2014 04:45:31 +0000 (15:45 +1100)
committerOlivier Lamy <olamy@apache.org>
Tue, 14 Oct 2014 04:59:00 +0000 (15:59 +1100)
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml

index 582a532257d61eab3155f0498c45bfdc80ca4e31..194583f510f778aff2205ce440e543c321f63bbc 100644 (file)
@@ -447,14 +447,10 @@ public class RssFeedServletTest
 
     }
 
-    @Ignore
+    @Test
     public void testInvalidAuthenticationRequest()
         throws Exception
     {
-        //RssFeedServlet servlet =
-        //    (RssFeedServlet) client.newInvocation( "http://localhost/feeds/unauthorized-repo" ).getServlet();
-
-        //WebRequest request = new GetMethodWebRequest( "http://localhost/feeds/unauthorized-repo" );
 
         MockHttpServletRequest request = new MockHttpServletRequest();
         request.setRequestURI( "/feeds/unauthorized-repo" );
index 5a66698c3be6c6077119b32afd50f10fd418e40f..53cfeb5cc0b661480860a5646408423f70cbc5cb 100644 (file)
@@ -96,11 +96,11 @@ public class SecuritySystemStub
     }
 
     @Override
-    public AuthorizationResult authorize( SecuritySession arg0, String arg1, String arg2 )
+    public AuthorizationResult authorize( SecuritySession arg0, String permission, String repositoryId )
         throws AuthorizationException
     {
-        AuthorizationResult result = new AuthorizationResult( true, arg1, null );
 
+        AuthorizationResult result = new AuthorizationResult( this.repoIds.contains( repositoryId ), permission, null );
         return result;
     }
 
index 17e6570f594b429efc6d6c97bdcac8da33c3e82f..b80c0b0fa3566f0cae7732820b51c0534ade5d39 100644 (file)
@@ -19,7 +19,7 @@
   -->
 
 
-<configuration status="debug">
+<configuration> <!--  status="debug"> -->
   <appenders>
     <Console name="console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>