Skip to content

Commit

Permalink
[MRELEASE-1093] adapt IT check to new output
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed May 24, 2022
1 parent 07965ca commit b36d864
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected ReleaseResult execute( ReleaseDescriptor releaseDescriptor, ReleaseEnv
if ( !StringUtils.isEmpty( goals ) )
{
logInfo( result, "Executing goals '" + goals + "'..." );
if ( logArguments )
if ( logArguments && ( additionalArguments != null ) )
{
// logging arguments may log secrets: should be activated only on dryRun
logInfo( result, " with additional arguments: " + additionalArguments );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.plugin.release.its</groupId>
<artifactId>mrelease-759</artifactId>
<artifactId>mrelease-459</artifactId>
<version>1.0-SNAPSHOT</version>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
File buildLog = new File( basedir, 'build.log' )
assert buildLog.exists()

def addArgsExpr = /\Q[DEBUG] Additional arguments: \E(?:-Dhttps.protocols=TLSv1.2 )?-P(.+)\Q-DperformRelease=true -f pom.xml\E/
def addArgsExpr = /\Q[INFO] with additional arguments: \E(?:-Dhttps.protocols=TLSv1.2 )?-P(.+)\Q-DperformRelease=true -f pom.xml\E/
def matcher = ( buildLog.getText() =~ addArgsExpr )

// M2: [DEBUG] Additional arguments: -P custom-release -DperformRelease=true -f pom.xml
// M3: [DEBUG] Additional arguments: -P it-repo,it-repo,custom-release -DperformRelease=true -f pom.xml
// M2: [INFO] with additional arguments: -P custom-release -DperformRelease=true -f pom.xml
// M3: [INFO] with additional arguments: -P it-repo,it-repo,custom-release -DperformRelease=true -f pom.xml

assert matcher.find()
assert matcher.getCount() == 1
Expand Down

0 comments on commit b36d864

Please sign in to comment.