mirror of https://github.com/apache/archiva.git
Switching to central admin credentials for tests
This commit is contained in:
parent
71b8409b5d
commit
338c198dc0
|
@ -24,6 +24,7 @@ import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants
|
|||
import org.apache.archiva.redback.rest.api.model.User;
|
||||
import org.apache.archiva.redback.rest.api.services.RoleManagementService;
|
||||
import org.apache.archiva.redback.rest.api.services.UserService;
|
||||
import org.apache.archiva.redback.rest.services.BaseSetup;
|
||||
import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
|
||||
import org.apache.archiva.rest.api.services.ManagedRepositoriesService;
|
||||
import org.apache.archiva.rest.api.services.ProxyConnectorService;
|
||||
|
@ -130,7 +131,7 @@ public abstract class AbstractDownloadTest
|
|||
String adminPwdSysProps = System.getProperty( "rest.admin.pwd" );
|
||||
if ( StringUtils.isBlank( adminPwdSysProps ) )
|
||||
{
|
||||
return encode( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME, FakeCreateAdminService.ADMIN_TEST_PWD );
|
||||
return encode( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME, BaseSetup.getAdminPwd() );
|
||||
}
|
||||
return encode( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME, adminPwdSysProps );
|
||||
}
|
||||
|
@ -176,7 +177,7 @@ public abstract class AbstractDownloadTest
|
|||
user.setEmail( "toto@toto.fr" );
|
||||
user.setFullName( "the root user" );
|
||||
user.setUsername( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME );
|
||||
user.setPassword( FakeCreateAdminService.ADMIN_TEST_PWD );
|
||||
user.setPassword( BaseSetup.getAdminPwd() );
|
||||
|
||||
getUserService( null ).createAdminUser( user );
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.apache.archiva.admin.model.beans.RemoteRepository;
|
|||
import org.apache.archiva.admin.model.beans.RepositoryGroup;
|
||||
import org.apache.archiva.maven2.model.Artifact;
|
||||
import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants;
|
||||
import org.apache.archiva.redback.rest.services.BaseSetup;
|
||||
import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
|
||||
import org.apache.archiva.rest.api.model.SearchRequest;
|
||||
import org.apache.archiva.rest.api.services.ManagedRepositoriesService;
|
||||
|
@ -196,7 +197,7 @@ public class DownloadMergedIndexNonDefaultPathTest
|
|||
remoteRepository.setUrl( "http://localhost:" + port + "/repository/test-group" );
|
||||
remoteRepository.setRemoteIndexUrl( "http://localhost:" + port + "/repository/test-group/" + path );
|
||||
remoteRepository.setUserName( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME );
|
||||
remoteRepository.setPassword( FakeCreateAdminService.ADMIN_TEST_PWD );
|
||||
remoteRepository.setPassword( BaseSetup.getAdminPwd() );
|
||||
|
||||
getRemoteRepositoriesService().addRemoteRepository( remoteRepository );
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.apache.archiva.admin.model.beans.RemoteRepository;
|
|||
import org.apache.archiva.admin.model.beans.RepositoryGroup;
|
||||
import org.apache.archiva.maven2.model.Artifact;
|
||||
import org.apache.archiva.redback.integration.security.role.RedbackRoleConstants;
|
||||
import org.apache.archiva.redback.rest.services.BaseSetup;
|
||||
import org.apache.archiva.redback.rest.services.FakeCreateAdminService;
|
||||
import org.apache.archiva.rest.api.model.SearchRequest;
|
||||
import org.apache.archiva.rest.api.services.ManagedRepositoriesService;
|
||||
|
@ -184,7 +185,7 @@ public class DownloadMergedIndexTest
|
|||
remoteRepository.setUrl( "http://localhost:" + port + "/repository/test-group" );
|
||||
remoteRepository.setRemoteIndexUrl( "http://localhost:" + port + "/repository/test-group/.index" );
|
||||
remoteRepository.setUserName( RedbackRoleConstants.ADMINISTRATOR_ACCOUNT_NAME );
|
||||
remoteRepository.setPassword( FakeCreateAdminService.ADMIN_TEST_PWD );
|
||||
remoteRepository.setPassword( BaseSetup.getAdminPwd() );
|
||||
|
||||
if ( getRemoteRepositoriesService().getRemoteRepository( remoteRepository.getId() ) != null )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue