mirror of https://github.com/apache/maven.git
o Used declarative skip directive
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@783120 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba5733b716
commit
76a1edfe52
|
@ -184,50 +184,45 @@ public class MavenITmng3599useHttpProxyForWebDAVTest
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
// TODO: implement equivalent test for 3.0 once supported
|
// TODO: implement equivalent test for 3.0 once supported
|
||||||
if ( matchesVersionRange( "[2.1.0-M1,3.0-alpha-1)" ) ) //2.1.0-M1+
|
requiresMavenVersion( "[2.1.0-M1,3.0-alpha-1)" );
|
||||||
{
|
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3599" );
|
|
||||||
|
|
||||||
/*
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3599" );
|
||||||
* NOTE: Make sure the WebDAV extension required by the test project has been pulled down into the local
|
|
||||||
* repo before the actual test installs Jetty as a mirror for everything. Otherwise, we will get garbage
|
|
||||||
* for the JAR/POM of the extension and its dependencies when run against a vanilla repo.
|
|
||||||
*/
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
|
||||||
verifier.executeGoal( "validate" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
|
||||||
verifier.resetStreams();
|
|
||||||
|
|
||||||
String settings = FileUtils.fileRead( new File( testDir, "settings.xml.template" ) );
|
/*
|
||||||
settings = StringUtils.replace( settings, "@port@", Integer.toString( port ) );
|
* NOTE: Make sure the WebDAV extension required by the test project has been pulled down into the local
|
||||||
String newSettings = StringUtils.replace( settings, "@protocol@", "dav" );
|
* repo before the actual test installs Jetty as a mirror for everything. Otherwise, we will get garbage
|
||||||
|
* for the JAR/POM of the extension and its dependencies when run against a vanilla repo.
|
||||||
FileUtils.fileWrite( new File( testDir, "settings.xml" ).getAbsolutePath(), newSettings );
|
*/
|
||||||
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.executeGoal( "validate" );
|
||||||
|
verifier.verifyErrorFreeLog();
|
||||||
|
verifier.resetStreams();
|
||||||
|
|
||||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
String settings = FileUtils.fileRead( new File( testDir, "settings.xml.template" ) );
|
||||||
|
settings = StringUtils.replace( settings, "@port@", Integer.toString( port ) );
|
||||||
|
String newSettings = StringUtils.replace( settings, "@protocol@", "dav" );
|
||||||
|
|
||||||
|
FileUtils.fileWrite( new File( testDir, "settings.xml" ).getAbsolutePath(), newSettings );
|
||||||
|
|
||||||
List cliOptions = new ArrayList();
|
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
cliOptions.add( "--settings" );
|
|
||||||
cliOptions.add( "settings.xml" );
|
|
||||||
cliOptions.add( "-X" );
|
|
||||||
|
|
||||||
verifier.setCliOptions( cliOptions );
|
|
||||||
|
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
List cliOptions = new ArrayList();
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" );
|
cliOptions.add( "--settings" );
|
||||||
|
cliOptions.add( "settings.xml" );
|
||||||
verifier.setLogFileName( "logDAV.txt" );
|
cliOptions.add( "-X" );
|
||||||
verifier.executeGoal( "compile" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.setCliOptions( cliOptions );
|
||||||
verifier.resetStreams();
|
|
||||||
|
|
||||||
verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
||||||
verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar",
|
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" );
|
||||||
content + LS );
|
|
||||||
}
|
verifier.setLogFileName( "logDAV.txt" );
|
||||||
else
|
verifier.executeGoal( "compile" );
|
||||||
{
|
verifier.verifyErrorFreeLog();
|
||||||
System.out.print( " [skipping DAV test for Maven versions < 2.1.0-M1] " );
|
verifier.resetStreams();
|
||||||
}
|
|
||||||
|
verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
||||||
|
verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar",
|
||||||
|
content + LS );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue