mirror of https://github.com/apache/maven.git
o Set log file name up front to make sure the final location of a build log does not depend on whether the test failed/passed
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@709936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e6686add99
commit
c5df24b1b0
|
@ -42,11 +42,11 @@ public class MavenIT0069Test
|
||||||
// phase 1: run build in online mode to fill local repo
|
// phase 1: run build in online mode to fill local repo
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
verifier.deleteArtifacts( "org.apache.maven.its.it0069" );
|
verifier.deleteArtifacts( "org.apache.maven.its.it0069" );
|
||||||
|
verifier.setLogFileName( "log1.txt" );
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
|
||||||
verifier.assertFilePresent( "target/compile.txt" );
|
verifier.assertFilePresent( "target/compile.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -56,11 +56,11 @@ public class MavenIT0069Test
|
||||||
List cliOptions = new ArrayList();
|
List cliOptions = new ArrayList();
|
||||||
cliOptions.add( "-o" );
|
cliOptions.add( "-o" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
verifier.setLogFileName( "log2.txt" );
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
|
||||||
verifier.assertFilePresent( "target/compile.txt" );
|
verifier.assertFilePresent( "target/compile.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,7 @@ public class MavenIT0069Test
|
||||||
List cliOptions = new ArrayList();
|
List cliOptions = new ArrayList();
|
||||||
cliOptions.add( "-o" );
|
cliOptions.add( "-o" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
verifier.setLogFileName( "log3.txt" );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-dependency-resolution:2.1-SNAPSHOT:compile" );
|
||||||
|
@ -80,7 +81,6 @@ public class MavenIT0069Test
|
||||||
// expected, should fail
|
// expected, should fail
|
||||||
}
|
}
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log3.txt" ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class MavenITmng2339BadProjectInterpolationTest
|
||||||
|
|
||||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-pom-specified.txt" );
|
||||||
verifier.executeGoal( "initialize" );
|
verifier.executeGoal( "initialize" );
|
||||||
|
|
||||||
assertTrue( "Touchfile using ${project.version} for ${version} does not exist.",
|
assertTrue( "Touchfile using ${project.version} for ${version} does not exist.",
|
||||||
|
@ -72,21 +73,17 @@ public class MavenITmng2339BadProjectInterpolationTest
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( testDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( testDir, "log-pom-specified.txt" ) );
|
|
||||||
|
|
||||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
|
||||||
List cliOptions = new ArrayList();
|
List cliOptions = new ArrayList();
|
||||||
cliOptions.add( "-Dversion=2" );
|
cliOptions.add( "-Dversion=2" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
verifier.setLogFileName( "log-cli-specified.txt" );
|
||||||
verifier.executeGoal( "initialize" );
|
verifier.executeGoal( "initialize" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
logFile.renameTo( new File( testDir, "log-cli-specified.txt" ) );
|
|
||||||
|
|
||||||
assertTrue( "Touchfile using CLI-specified ${version} does not exist.",
|
assertTrue( "Touchfile using CLI-specified ${version} does not exist.",
|
||||||
new File( testDir, "target/touch-2.txt" ).exists() );
|
new File( testDir, "target/touch-2.txt" ).exists() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ package org.apache.maven.it;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.it.Verifier;
|
import org.apache.maven.it.Verifier;
|
||||||
import org.apache.maven.it.util.FileUtils;
|
|
||||||
import org.apache.maven.it.util.ResourceExtractor;
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -57,12 +56,12 @@ public class MavenITmng2695OfflinePluginSnapshotsTest
|
||||||
verifier.deleteDirectory( "target" );
|
verifier.deleteDirectory( "target" );
|
||||||
verifier.deleteArtifacts( "org.apache.maven.its.mng2695" );
|
verifier.deleteArtifacts( "org.apache.maven.its.mng2695" );
|
||||||
verifier.setAutoclean( false );
|
verifier.setAutoclean( false );
|
||||||
|
verifier.setLogFileName( "log1.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.assertFilePresent( "target/a.txt" );
|
verifier.assertFilePresent( "target/a.txt" );
|
||||||
verifier.assertFilePresent( "target/b.txt" );
|
verifier.assertFilePresent( "target/b.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -71,12 +70,12 @@ public class MavenITmng2695OfflinePluginSnapshotsTest
|
||||||
verifier.deleteDirectory( "target" );
|
verifier.deleteDirectory( "target" );
|
||||||
verifier.setAutoclean( false );
|
verifier.setAutoclean( false );
|
||||||
verifier.setCliOptions( Collections.singletonList( "-o" ) );
|
verifier.setCliOptions( Collections.singletonList( "-o" ) );
|
||||||
|
verifier.setLogFileName( "log2.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.assertFilePresent( "target/a.txt" );
|
verifier.assertFilePresent( "target/a.txt" );
|
||||||
verifier.assertFilePresent( "target/b.txt" );
|
verifier.assertFilePresent( "target/b.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ public class MavenITmng3221InfiniteForkingTest
|
||||||
|
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3221", "maven-forking-report-plugin", "1", "jar" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3221", "maven-forking-report-plugin", "1", "jar" );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "mng-3221-a-log.txt" );
|
||||||
verifier.executeGoal( "install" );
|
verifier.executeGoal( "install" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
@ -61,6 +62,7 @@ public class MavenITmng3221InfiniteForkingTest
|
||||||
cliOptions.add( "-Psite" );
|
cliOptions.add( "-Psite" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "mng-3221-a-log.txt" );
|
||||||
verifier.executeGoal( "site" );
|
verifier.executeGoal( "site" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
}
|
}
|
||||||
|
@ -70,11 +72,6 @@ public class MavenITmng3221InfiniteForkingTest
|
||||||
{
|
{
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
}
|
}
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
File logFileBackup = new File( logBackupDir, "mng-3221-a-log.txt" );
|
|
||||||
|
|
||||||
logFile.renameTo( logFileBackup );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +92,7 @@ public class MavenITmng3221InfiniteForkingTest
|
||||||
|
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3221", "maven-forking-test-plugin", "1", "jar" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3221", "maven-forking-test-plugin", "1", "jar" );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "mng-3221-b-log.txt" );
|
||||||
verifier.executeGoal( "install" );
|
verifier.executeGoal( "install" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
@ -105,6 +103,7 @@ public class MavenITmng3221InfiniteForkingTest
|
||||||
cliOptions.add( "-Pplugin" );
|
cliOptions.add( "-Pplugin" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "mng-3221-b-log.txt" );
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "package" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
}
|
}
|
||||||
|
@ -114,11 +113,6 @@ public class MavenITmng3221InfiniteForkingTest
|
||||||
{
|
{
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
}
|
}
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
File logFileBackup = new File( logBackupDir, "mng-3221-b-log.txt" );
|
|
||||||
|
|
||||||
logFile.renameTo( logFileBackup );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,22 +56,22 @@ public class MavenITmng3314OfflineSnapshotsTest
|
||||||
// phase 1: run build in online mode to fill local repo
|
// phase 1: run build in online mode to fill local repo
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
verifier.deleteArtifacts( "org.apache.maven.its.mng3314" );
|
verifier.deleteArtifacts( "org.apache.maven.its.mng3314" );
|
||||||
|
verifier.setLogFileName( "log1.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.assertFilePresent( "target/compile.txt" );
|
verifier.assertFilePresent( "target/compile.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log1.txt" ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// phase 2: run build in offline mode to check it still passes
|
// phase 2: run build in offline mode to check it still passes
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
verifier.setCliOptions( Collections.singletonList( "-o" ) );
|
verifier.setCliOptions( Collections.singletonList( "-o" ) );
|
||||||
|
verifier.setLogFileName( "log2.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.assertFilePresent( "target/compile.txt" );
|
verifier.assertFilePresent( "target/compile.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
new File( testDir, "log.txt").renameTo( new File( testDir, "log2.txt" ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,26 +112,22 @@ public class MavenITmng3415JunkRepositoryMetadataTest
|
||||||
cliOptions.add( settings.getPath() );
|
cliOptions.add( settings.getPath() );
|
||||||
|
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
verifier.setLogFileName( "log-" + methodName + "-firstBuild.txt" );
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "package" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File firstLogFile = new File( testDir, "log-" + methodName + "-firstBuild.txt" );
|
|
||||||
logFile.renameTo( firstLogFile );
|
|
||||||
|
|
||||||
assertMetadataMissing( localRepo );
|
assertMetadataMissing( localRepo );
|
||||||
|
|
||||||
setupDummyDependency( testDir, localRepo, true );
|
setupDummyDependency( testDir, localRepo, true );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-" + methodName + "-secondBuild.txt" );
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "package" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File secondLogFile = new File( testDir, "log-" + methodName + "-secondBuild.txt" );
|
|
||||||
logFile.renameTo( secondLogFile );
|
|
||||||
|
|
||||||
assertMetadataMissing( localRepo );
|
assertMetadataMissing( localRepo );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,13 +189,13 @@ public class MavenITmng3415JunkRepositoryMetadataTest
|
||||||
|
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-" + methodName + "-firstBuild.txt" );
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "package" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File firstLogFile = new File( testDir, "log-" + methodName + "-firstBuild.txt" );
|
File firstLogFile = new File( testDir, verifier.getLogFileName() );
|
||||||
logFile.renameTo( firstLogFile );
|
|
||||||
|
|
||||||
// FIXME: There really should be a better way than this!
|
// FIXME: There really should be a better way than this!
|
||||||
assertOutputLinePresent( verifier, firstLogFile, "snapshot tests:missing:1.0-SNAPSHOT: checking for updates from testing-repo" );
|
assertOutputLinePresent( verifier, firstLogFile, "snapshot tests:missing:1.0-SNAPSHOT: checking for updates from testing-repo" );
|
||||||
|
@ -209,13 +205,13 @@ public class MavenITmng3415JunkRepositoryMetadataTest
|
||||||
|
|
||||||
setupDummyDependency( testDir, localRepo, false );
|
setupDummyDependency( testDir, localRepo, false );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-" + methodName + "-secondBuild.txt" );
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "package" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File secondLogFile = new File( testDir, "log-" + methodName + "-secondBuild.txt" );
|
File secondLogFile = new File( testDir, verifier.getLogFileName() );
|
||||||
logFile.renameTo( secondLogFile );
|
|
||||||
|
|
||||||
// FIXME: There really should be a better way than this!
|
// FIXME: There really should be a better way than this!
|
||||||
assertOutputLineMissing( verifier, secondLogFile, "snapshot tests:missing:1.0-SNAPSHOT: checking for updates from testing-repo" );
|
assertOutputLineMissing( verifier, secondLogFile, "snapshot tests:missing:1.0-SNAPSHOT: checking for updates from testing-repo" );
|
||||||
|
|
|
@ -166,13 +166,11 @@ public class MavenITmng3599useHttpProxyForWebDAVTest
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "logHttp.txt" );
|
||||||
verifier.executeGoal( "compile" );
|
verifier.executeGoal( "compile" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( testDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( testDir, "logHttp.txt" ) );
|
|
||||||
|
|
||||||
verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
||||||
verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar",
|
verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar",
|
||||||
content + LS );
|
content + LS );
|
||||||
|
@ -217,13 +215,11 @@ public class MavenITmng3599useHttpProxyForWebDAVTest
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" );
|
verifier.deleteArtifact( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "pom" );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "logDAV.txt" );
|
||||||
verifier.executeGoal( "compile" );
|
verifier.executeGoal( "compile" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( testDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( testDir, "logDAV.txt" ) );
|
|
||||||
|
|
||||||
verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
verifier.assertArtifactPresent( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar" );
|
||||||
verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar",
|
verifier.assertArtifactContents( "org.apache.maven.its.mng3599", "test-dependency", "1.0", "jar",
|
||||||
content + LS );
|
content + LS );
|
||||||
|
|
|
@ -109,12 +109,10 @@ public class MavenITmng3652UserAgentHeaderTest
|
||||||
cliOptions.add( "-X" );
|
cliOptions.add( "-X" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-unConfiguredHttp.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( projectDir, "log-unConfiguredHttp.txt" ) );
|
|
||||||
|
|
||||||
String userAgent = this.userAgent;
|
String userAgent = this.userAgent;
|
||||||
assertNotNull( userAgent );
|
assertNotNull( userAgent );
|
||||||
|
@ -159,6 +157,7 @@ public class MavenITmng3652UserAgentHeaderTest
|
||||||
cliOptions.add( "-X" );
|
cliOptions.add( "-X" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-unConfiguredDAV.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
@ -176,9 +175,6 @@ public class MavenITmng3652UserAgentHeaderTest
|
||||||
String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
|
String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
|
||||||
String artifactVersion = (String) lines.get( 4 );
|
String artifactVersion = (String) lines.get( 4 );
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( projectDir, "log-unConfiguredDAV.txt" ) );
|
|
||||||
|
|
||||||
String userAgent = this.userAgent;
|
String userAgent = this.userAgent;
|
||||||
assertNotNull( userAgent );
|
assertNotNull( userAgent );
|
||||||
|
|
||||||
|
@ -211,6 +207,7 @@ public class MavenITmng3652UserAgentHeaderTest
|
||||||
cliOptions.add( "-X" );
|
cliOptions.add( "-X" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-configWithoutUserAgent.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
@ -228,9 +225,6 @@ public class MavenITmng3652UserAgentHeaderTest
|
||||||
String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
|
String os = (String) lines.get( 2 ) + " " + (String) lines.get( 3 );
|
||||||
String artifactVersion = (String) lines.get( 4 );
|
String artifactVersion = (String) lines.get( 4 );
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( projectDir, "log-configWithoutUserAgent.txt" ) );
|
|
||||||
|
|
||||||
String userAgent = this.userAgent;
|
String userAgent = this.userAgent;
|
||||||
assertNotNull( userAgent );
|
assertNotNull( userAgent );
|
||||||
|
|
||||||
|
@ -263,13 +257,11 @@ public class MavenITmng3652UserAgentHeaderTest
|
||||||
cliOptions.add( "-X" );
|
cliOptions.add( "-X" );
|
||||||
verifier.setCliOptions( cliOptions );
|
verifier.setCliOptions( cliOptions );
|
||||||
|
|
||||||
|
verifier.setLogFileName( "log-configWithUserAgent.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( projectDir, "log-configWithUserAgent.txt" ) );
|
|
||||||
|
|
||||||
String userAgent = this.userAgent;
|
String userAgent = this.userAgent;
|
||||||
assertNotNull( userAgent );
|
assertNotNull( userAgent );
|
||||||
|
|
||||||
|
|
|
@ -52,20 +52,16 @@ public class MavenITmng3684BuildPluginParameterTest
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
verifier = new Verifier( projectDir.getAbsolutePath() );
|
verifier = new Verifier( projectDir.getAbsolutePath() );
|
||||||
|
verifier.setLogFileName( "log-validate.txt" );
|
||||||
verifier.executeGoal( "validate" );
|
verifier.executeGoal( "validate" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
verifier.setLogFileName( "log-site.txt" );
|
||||||
logFile.renameTo( new File( projectDir, "log-validate.txt" ) );
|
|
||||||
|
|
||||||
verifier.executeGoal( "site" );
|
verifier.executeGoal( "site" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
logFile.renameTo( new File( projectDir, "log-site.txt" ) );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,14 +56,12 @@ public class MavenITmng3703ExecutionProjectWithRelativePathsTest
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
verifier = new Verifier( projectDir.getAbsolutePath() );
|
verifier = new Verifier( projectDir.getAbsolutePath() );
|
||||||
|
verifier.setLogFileName( "log-mojo.txt" );
|
||||||
|
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "package" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( projectDir, "log-mojo.txt" ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testForkFromReport()
|
public void testForkFromReport()
|
||||||
|
@ -83,13 +81,11 @@ public class MavenITmng3703ExecutionProjectWithRelativePathsTest
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
verifier = new Verifier( projectDir.getAbsolutePath() );
|
verifier = new Verifier( projectDir.getAbsolutePath() );
|
||||||
|
verifier.setLogFileName( "log-report.txt" );
|
||||||
|
|
||||||
verifier.executeGoal( "site" );
|
verifier.executeGoal( "site" );
|
||||||
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
File logFile = new File( projectDir, "log.txt" );
|
|
||||||
logFile.renameTo( new File( projectDir, "log-report.txt" ) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue