瀏覽代碼

[MRM-1145] RSS tests do not correctly check responses

tags/archiva-2.2.0
Olivier Lamy 9 年之前
父節點
當前提交
31cc47c313

+ 1
- 5
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java 查看文件

@@ -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" );

+ 2
- 2
archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java 查看文件

@@ -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;
}


+ 1
- 1
archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml 查看文件

@@ -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"/>

Loading…
取消
儲存