archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1197635 - /archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java
Date Fri, 04 Nov 2011 16:33:16 GMT
Author: olamy
Date: Fri Nov  4 16:33:15 2011
New Revision: 1197635

URL: http://svn.apache.org/viewvc?rev=1197635&view=rev
Log:
fix compilation issue due to redback upgrade

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java?rev=1197635&r1=1197634&r2=1197635&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/DownloadArtifactsTest.java
Fri Nov  4 16:33:15 2011
@@ -32,8 +32,8 @@ import org.apache.cxf.jaxrs.client.WebCl
 import org.apache.cxf.transport.servlet.CXFServlet;
 import org.apache.maven.wagon.providers.http.HttpWagon;
 import org.apache.maven.wagon.repository.Repository;
-import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.redback.integration.security.role.RedbackRoleConstants;
+import org.codehaus.redback.rest.api.model.User;
 import org.codehaus.redback.rest.api.services.RoleManagementService;
 import org.codehaus.redback.rest.api.services.UserService;
 import org.codehaus.redback.rest.services.FakeCreateAdminService;
@@ -58,11 +58,7 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.File;
-import java.io.FileWriter;
 import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -183,10 +179,13 @@ public class DownloadArtifactsTest
         this.redirectPort = redirectServer.getConnectors()[0].getLocalPort();
         log.info( "redirect server port {}", redirectPort );
 
-        FakeCreateAdminService fakeCreateAdminService = getFakeCreateAdminService();
+        User user = new User();
+        user.setEmail( "toto@toto.fr" );
+        user.setFullName( "the root user" );
+        user.setUsername( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME );
+        user.setPassword( FakeCreateAdminService.ADMIN_TEST_PWD );
 
-        Boolean res = fakeCreateAdminService.createAdminIfNeeded();
-        assertTrue( res.booleanValue() );
+        getUserService( null ).createAdminUser( user );
 
 
     }
@@ -223,7 +222,6 @@ public class DownloadArtifactsTest
 
         getUserService( authorizationHeader ).removeFromCache( "guest" );
 
-
         /*
         URL url = new URL( "http://localhost:" + port + "/repository/internal/junit/junit/4.9/junit-4.9.jar"
);
         HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();



Mime
View raw message