diff options
author | Martin Stockhammer <martin_s@apache.org> | 2019-07-28 15:24:13 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2019-07-28 15:24:13 +0200 |
commit | bb3b074aaf5a2be0d81c950ecf1588fe8efa3316 (patch) | |
tree | 8f165780e4d81cfdb6ed4a73c40fbed3a6f39a69 /archiva-modules/archiva-web/archiva-webdav/src/test | |
parent | 8e4acdc82a875ca32e39eb216b879c002d228de3 (diff) | |
download | archiva-bb3b074aaf5a2be0d81c950ecf1588fe8efa3316.tar.gz archiva-bb3b074aaf5a2be0d81c950ecf1588fe8efa3316.zip |
Refactoring to StorageAsset access
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webdav/src/test')
2 files changed, 6 insertions, 5 deletions
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/DavResourceTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/DavResourceTest.java index 6eb286729..715057212 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/DavResourceTest.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/DavResourceTest.java @@ -24,7 +24,7 @@ import org.apache.archiva.common.filelock.FileLockManager; import org.apache.archiva.common.utils.FileUtils; import org.apache.archiva.repository.LayoutException; import org.apache.archiva.repository.RepositoryRegistry; -import org.apache.archiva.repository.content.FilesystemAsset; +import org.apache.archiva.repository.storage.FilesystemAsset; import org.apache.archiva.repository.events.AuditListener; import org.apache.archiva.repository.maven2.MavenManagedRepository; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; @@ -127,7 +127,7 @@ public class DavResourceTest private DavResource getDavResource( String logicalPath, Path file ) throws LayoutException { - return new ArchivaDavResource( new FilesystemAsset( logicalPath, file.toAbsolutePath()) , logicalPath, repository, session, resourceLocator, + return new ArchivaDavResource( new FilesystemAsset( repository, logicalPath, file.toAbsolutePath()) , logicalPath, repository, session, resourceLocator, resourceFactory, mimeTypes, Collections.<AuditListener> emptyList(), null); } @@ -349,7 +349,7 @@ public class DavResourceTest { try { - return new ArchivaDavResource( new FilesystemAsset( "/" , baseDir.toAbsolutePath()), "/", repository, session, resourceLocator, + return new ArchivaDavResource( new FilesystemAsset(repository, "/" , baseDir.toAbsolutePath()), "/", repository, session, resourceLocator, resourceFactory, mimeTypes, Collections.<AuditListener> emptyList(), null ); } diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/OverridingRepositoryProxyHandler.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/OverridingRepositoryProxyHandler.java index 75f6726b7..1343c9452 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/OverridingRepositoryProxyHandler.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/OverridingRepositoryProxyHandler.java @@ -22,6 +22,7 @@ package org.apache.archiva.webdav; import org.apache.archiva.proxy.maven.MavenRepositoryProxyHandler; import org.apache.archiva.proxy.model.ProxyFetchResult; import org.apache.archiva.repository.ManagedRepositoryContent; +import org.apache.archiva.repository.storage.StorageAsset; import org.apache.commons.io.FileUtils; import java.io.IOException; @@ -40,10 +41,10 @@ class OverridingRepositoryProxyHandler @Override public ProxyFetchResult fetchMetadataFromProxies(ManagedRepositoryContent repository, String logicalPath ) { - Path target = Paths.get(repository.getRepoRoot(), logicalPath ); + StorageAsset target = repository.getRepository().getAsset( logicalPath ); try { - FileUtils.copyFile( archivaDavResourceFactoryTest.getProjectBase().resolve( "target/test-classes/maven-metadata.xml" ).toFile(), target.toFile() ); + FileUtils.copyFile( archivaDavResourceFactoryTest.getProjectBase().resolve( "target/test-classes/maven-metadata.xml" ).toFile(), target.getFilePath().toFile() ); } catch ( IOException e ) { |