From c63c1b9b4d04bf4d1623ac8e5b69cba9a41c29ff Mon Sep 17 00:00:00 2001 From: Evan Wilde Date: Thu, 10 Jul 2025 11:01:36 -0700 Subject: [PATCH] Tests: Disable Git Commit Signing in Tests The test suite creates a tiny test suite with a custom user email. If a developer working on Swiftly has commit signing enabled, that tool will see that the committer email and the signing identity don't match, and will fail to sign the commit, causing the `testGit` test to fail. Disabling gpg signing commits in the temporary test repo. --- Tests/SwiftlyTests/CommandLineTests.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/SwiftlyTests/CommandLineTests.swift b/Tests/SwiftlyTests/CommandLineTests.swift index f9bd4d14..8f33bfac 100644 --- a/Tests/SwiftlyTests/CommandLineTests.swift +++ b/Tests/SwiftlyTests/CommandLineTests.swift @@ -95,7 +95,8 @@ public struct CommandLineTests { // AND a simple history try "Some text".write(to: tmp / "foo.txt", atomically: true) try await Swiftly.currentPlatform.runProgram("git", "-C", "\(tmp)", "add", "foo.txt") - try await Swiftly.currentPlatform.runProgram("git", "-C", "\(tmp)", "config", "user.email", "user@example.com") + try await Swiftly.currentPlatform.runProgram("git", "-C", "\(tmp)", "config", "--local", "user.email", "user@example.com") + try await Swiftly.currentPlatform.runProgram("git", "-C", "\(tmp)", "config", "--local", "commit.gpgsign", "false") try await sys.git(.workingDir(tmp)).commit(.message("Initial commit")).run(Swiftly.currentPlatform) try await sys.git(.workingDir(tmp)).diffindex(.quiet, tree_ish: "HEAD").run(Swiftly.currentPlatform)