archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1403529 - in /archiva/trunk/archiva-modules/archiva-web: archiva-security/src/test/java/org/apache/archiva/security/mock/ archiva-security/src/test/resources/ archiva-webdav/src/main/java/org/apache/archiva/webdav/
Date Mon, 29 Oct 2012 21:07:24 GMT
Author: olamy
Date: Mon Oct 29 21:07:23 2012
New Revision: 1403529

URL: http://svn.apache.org/viewvc?rev=1403529&view=rev
Log:
more unit test failures

Added:
    archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/
    archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java
  (with props)
Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
    archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java

Added: archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java?rev=1403529&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java
(added)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java
Mon Oct 29 21:07:23 2012
@@ -0,0 +1,145 @@
+package org.apache.archiva.security.mock;
+/*
+ * 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.
+ */
+
+import org.apache.archiva.metadata.model.ArtifactMetadata;
+import org.apache.archiva.metadata.model.ProjectMetadata;
+import org.apache.archiva.metadata.model.ProjectVersionMetadata;
+import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.repository.RepositorySession;
+import org.apache.archiva.metadata.repository.filter.Filter;
+import org.apache.archiva.metadata.repository.storage.ReadMetadataRequest;
+import org.apache.archiva.metadata.repository.storage.RepositoryStorage;
+import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataException;
+import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataInvalidException;
+import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataNotFoundException;
+import org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException;
+import org.apache.archiva.model.ArtifactReference;
+import org.apache.archiva.policies.ProxyDownloadException;
+import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
+import org.apache.archiva.repository.ManagedRepositoryContent;
+import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.scheduler.repository.model.RepositoryArchivaTaskScheduler;
+import org.apache.archiva.scheduler.repository.model.RepositoryTask;
+
+import java.util.Collection;
+
+/**
+ * @author Olivier Lamy
+ */
+public class MockRepositoryStorage
+    implements RepositoryStorage, RepositoryListener, RepositoryArchivaTaskScheduler
+{
+    public ProjectMetadata readProjectMetadata( String repoId, String namespace, String projectId
)
+    {
+        return null;
+    }
+
+    public ProjectVersionMetadata readProjectVersionMetadata( ReadMetadataRequest readMetadataRequest
)
+        throws RepositoryStorageMetadataInvalidException, RepositoryStorageMetadataNotFoundException,
+        RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public Collection<String> listRootNamespaces( String repoId, Filter<String>
filter )
+        throws RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public Collection<String> listNamespaces( String repoId, String namespace, Filter<String>
filter )
+        throws RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public Collection<String> listProjects( String repoId, String namespace, Filter<String>
filter )
+        throws RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public Collection<String> listProjectVersions( String repoId, String namespace,
String projectId,
+                                                   Filter<String> filter )
+        throws RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public Collection<ArtifactMetadata> readArtifactsMetadata( ReadMetadataRequest
readMetadataRequest )
+        throws RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public ArtifactMetadata readArtifactMetadataFromPath( String repoId, String path )
+        throws RepositoryStorageRuntimeException
+    {
+        return null;
+    }
+
+    public void applyServerSideRelocation( ManagedRepositoryContent managedRepository, ArtifactReference
artifact )
+        throws ProxyDownloadException
+    {
+
+    }
+
+
+    public void deleteArtifact( MetadataRepository metadataRepository, String repositoryId,
String namespace,
+                                String project, String version, String id )
+    {
+
+    }
+
+    public void addArtifact( RepositorySession session, String repoId, String namespace,
String projectId,
+                             ProjectVersionMetadata metadata )
+    {
+
+    }
+
+    public void addArtifactProblem( RepositorySession session, String repoId, String namespace,
String projectId,
+                                    String projectVersion, RepositoryStorageMetadataException
exception )
+    {
+
+    }
+
+
+    public boolean isProcessingRepositoryTask( String repositoryId )
+    {
+        return false;
+    }
+
+    public boolean isProcessingRepositoryTask( RepositoryTask task )
+    {
+        return false;
+    }
+
+    public void queueTask( RepositoryTask task )
+        throws TaskQueueException
+    {
+
+    }
+
+    public boolean unQueueTask( RepositoryTask task )
+        throws TaskQueueException
+    {
+        return false;
+    }
+}

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockRepositoryStorage.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml?rev=1403529&r1=1403528&r2=1403529&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
Mon Oct 29 21:07:23 2012
@@ -101,6 +101,10 @@
     </property>
   </bean>
 
+  <bean name="repositoryStorage#maven2" class="org.apache.archiva.security.mock.MockRepositoryStorage"/>
+
+  <bean name="archivaTaskScheduler#repository" class="org.apache.archiva.security.mock.MockRepositoryStorage"/>
+
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">
       <props>

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java?rev=1403529&r1=1403528&r2=1403529&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
(original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaDavResourceFactory.java
Mon Oct 29 21:07:23 2012
@@ -54,8 +54,7 @@ import org.apache.archiva.repository.Man
 import org.apache.archiva.repository.RepositoryContentFactory;
 import org.apache.archiva.repository.RepositoryException;
 import org.apache.archiva.repository.RepositoryNotFoundException;
-import org.apache.archiva.repository.content.LegacyPathParser;
-import org.apache.archiva.repository.content.RepositoryRequest;
+import org.apache.archiva.repository.content.maven2.RepositoryRequest;
 import org.apache.archiva.repository.layout.LayoutException;
 import org.apache.archiva.repository.metadata.MetadataTools;
 import org.apache.archiva.repository.metadata.RepositoryMetadataException;



Mime
View raw message