From da1216f7346d74c4b45c1b7f042a2fabb0251baa Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 1 Oct 2015 16:02:49 +1000 Subject: [PATCH] more usage of MockRepositorySessionFactory --- .../archiva-base/archiva-proxy/pom.xml | 7 ++- .../TestRepositorySessionFactory.java | 43 ------------------- 2 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml index 09ab29469..83e0ce068 100644 --- a/archiva-modules/archiva-base/archiva-proxy/pom.xml +++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml @@ -175,6 +175,11 @@ archiva-repository-admin-default test + + org.apache.archiva + archiva-mock + test + org.apache.archiva.redback redback-rbac-cached @@ -254,7 +259,7 @@ ${project.build.directory}/appserver-base ${redbackTestJdbcUrl} ${redbackTestJdbcDriver} - test + mock diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java deleted file mode 100644 index 5d2e82095..000000000 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.apache.archiva.metadata.repository; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Configurable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.springframework.stereotype.Service; - -/* -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ -@Service("repositorySessionFactory#test") -public class TestRepositorySessionFactory - implements RepositorySessionFactory -{ - private MetadataResolver resolver; - - @Override - public RepositorySession createSession() - { - return new RepositorySession( new AbstractMetadataRepository() {}, resolver ); - } - - public void setResolver( MetadataResolver resolver ) - { - Configurable configurable; - Startable startable; - this.resolver = resolver; - } -} -- 2.39.5