diff options
Diffstat (limited to 'archiva-modules/archiva-web/archiva-security')
3 files changed, 9 insertions, 1 deletions
diff --git a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/AbstractSecurityTest.java b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/AbstractSecurityTest.java index 0d61740c3..25b0ed67d 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/AbstractSecurityTest.java +++ b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/AbstractSecurityTest.java @@ -32,6 +32,7 @@ import org.apache.archiva.redback.system.SecuritySystem; import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.redback.users.UserManagerException; +import org.apache.archiva.repository.RepositoryRegistry; import org.apache.archiva.security.common.ArchivaRoleConstants; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.io.FileUtils; @@ -80,6 +81,9 @@ public abstract class AbstractSecurityTest private ArchivaConfiguration archivaConfiguration; @Inject + private RepositoryRegistry repositoryRegistry; + + @Inject protected UserRepositories userRepos; protected void setupRepository( String repoId ) @@ -94,6 +98,7 @@ public abstract class AbstractSecurityTest { archivaConfiguration.getConfiguration().addManagedRepository( repoConfig ); } + repositoryRegistry.reload(); // Add repo roles to security. userRepos.createMissingRepositoryRoles( repoId ); diff --git a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java index d513a3539..9480019a0 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java +++ b/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java @@ -156,7 +156,7 @@ public class MockBeanServices } @Override - public String getFilePath( String requestPath, ManagedRepository managedRepository ) + public String getFilePath( String requestPath, org.apache.archiva.repository.ManagedRepository managedRepository ) { return null; } diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml index 696514868..fcc22aecc 100644 --- a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml +++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml @@ -27,6 +27,9 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd" default-lazy-init="true"> + <alias name="managedRepositoryContent#maven" alias="managedRepositoryContent#default" /> + <alias name="remoteRepositoryContent#maven" alias="remoteRepositoryContent#default" /> + <bean name="securitySystem#testable" class="org.apache.archiva.redback.system.DefaultSecuritySystem"> <property name="userManager" ref="userManager#memory"/> <property name="keyManager" ref="keyManager#memory"/> |