mirror of
https://github.com/apache/archiva.git
synced 2025-02-06 18:19:02 +00:00
cleanup configuration before test
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1128783 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
26c1c11252
commit
67af3bcb6a
@ -21,6 +21,7 @@
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.maven.archiva.common.utils.VersionUtil;
|
||||
import org.apache.maven.archiva.configuration.ProxyConnectorConfiguration;
|
||||
import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
|
||||
import org.apache.maven.archiva.model.Plugin;
|
||||
import org.apache.maven.archiva.model.ProjectReference;
|
||||
@ -42,6 +43,7 @@
|
||||
|
||||
import java.io.File;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@ -198,10 +200,13 @@ public void testGetProjectMetadataNotProxiedNotLocal()
|
||||
public void testGetProjectMetadataNotProxiedOnLocal()
|
||||
throws Exception
|
||||
{
|
||||
|
||||
// Project metadata that exists and has multiple versions
|
||||
String requestedResource = "org/apache/maven/test/get-project-metadata/maven-metadata.xml";
|
||||
setupTestableManagedRepository( requestedResource );
|
||||
|
||||
config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>( ) );
|
||||
|
||||
assertResourceExists( requestedResource );
|
||||
|
||||
// No proxy setup, nothing fetched from remote, but local exists.
|
||||
@ -321,10 +326,13 @@ public void testGetProjectMetadataProxiedOnLocalMultipleRemote()
|
||||
public void testGetProjectMetadataProxiedOnLocalNotRemote()
|
||||
throws Exception
|
||||
{
|
||||
|
||||
// Project metadata that exist locally, and does not exist in remote repos.
|
||||
String requestedResource = "org/apache/maven/test/get-not-on-remotes/maven-metadata.xml";
|
||||
setupTestableManagedRepository( requestedResource );
|
||||
|
||||
|
||||
config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>( ) );
|
||||
// Configure Connector (usually done within archiva.xml configuration)
|
||||
saveConnector( ID_DEFAULT_MANAGED, ID_PROXIED1, ChecksumPolicy.FIX, ReleasesPolicy.ALWAYS,
|
||||
SnapshotsPolicy.ALWAYS, CachedFailuresPolicy.NO, false );
|
||||
|
Loading…
x
Reference in New Issue
Block a user