Skip to content

Commit 8e3a042

Browse files
authored
Avoid GPG agent interactions during test runs
1 parent f27c378 commit 8e3a042

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void includesGitInfoWhenEnabled(String originUrl, @TempDir Path tempDirectory) t
191191

192192
execGit(tempDirectory, "config", "user.name", "Alice");
193193
execGit(tempDirectory, "config", "user.email", "[email protected]");
194-
execGit(tempDirectory, "commit", "-m", "Initial commit");
194+
execGit(tempDirectory, "commit", "--no-gpg-sign", "-m", "Initial commit");
195195

196196
var engine = new DemoHierarchicalTestEngine("dummy");
197197

@@ -280,6 +280,7 @@ private static ProcessResult tryExecGit(Path workingDir, String... arguments) th
280280
System.out.println("$ git " + String.join(" ", arguments));
281281
return new ProcessStarter() //
282282
.executable(Path.of("git")) //
283+
.putEnvironment("GIT_CONFIG_GLOBAL", "/dev/null") // https://git-scm.com/docs/git#Documentation/git.txt-GITCONFIGGLOBAL
283284
.workingDir(workingDir) //
284285
.addArguments(arguments) //
285286
.startAndWait();

0 commit comments

Comments
 (0)