Skip to content

Commit 8234901

Browse files
authored
Fix IT isolation for MNG-6256 IT (#11395) (#11396)
This IT was still "escaping", as Verifier was created for directory below invocation (redirected with -f) option. Turned this IT into "manually managing" and added `.mvn` to it. Backport of a46b0c7
1 parent 88931d5 commit 8234901

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6256SpecialCharsAlternatePOMLocation.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
* This is a test set for <a href="https://issues.apache.org/jira/browse/MNG-6256">MNG-6256</a>: check that directories
2727
* passed via <code>-f/--file</code> containing special characters do not break the script. E.g
2828
* <code>-f "directoryWithClosing)Bracket/pom.xml"</code>.
29+
*
30+
* This IT manually manages {@code .mvn} directories, so instructs Verifier to NOT create any.
2931
*/
3032
public class MavenITmng6256SpecialCharsAlternatePOMLocation extends AbstractMavenIntegrationTestCase {
3133
public MavenITmng6256SpecialCharsAlternatePOMLocation() {
@@ -68,7 +70,7 @@ private void runCoreExtensionWithOption(String option, String subDir) throws Exc
6870
File testDir = new File(resourceDir, "../mng-6256-" + subDir);
6971
testDir.mkdir();
7072

71-
Verifier verifier = newVerifier(testDir.getAbsolutePath());
73+
Verifier verifier = newVerifier(testDir.getAbsolutePath(), false);
7274
verifier.addCliArgument(option); // -f/--file
7375
verifier.addCliArgument("\"" + new File(resourceDir, subDir).getAbsolutePath() + "\""); // "<path>"
7476
verifier.addCliArgument("validate");

its/core-it-suite/src/test/resources/mng-6256-special-chars-alternate-pom-location/.mvn/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)