aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-07-13 15:00:51 +0200
committerMartin Stockhammer <martin_s@apache.org>2020-07-13 15:00:51 +0200
commit338c198dc0793e579dde5d81163027e2105e1407 (patch)
treef0f7c37430a94506312e2b1d5b55475039553f84
parent71b8409b5ddc9d941336c56cd8727d5bcf5415d9 (diff)
downloadarchiva-338c198dc0793e579dde5d81163027e2105e1407.tar.gz
archiva-338c198dc0793e579dde5d81163027e2105e1407.zip
Switching to central admin credentials for tests
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java5
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java3
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java3
3 files changed, 7 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
index fb0f2d667..34a93d15e 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
@@ -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 );
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
index a0d5ff3d1..d7e25900e 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexNonDefaultPathTest.java
@@ -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 );
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java
index 01b2cb6bf..213d19934 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadMergedIndexTest.java
@@ -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 )
{