Skip to content

Commit ab4df1b

Browse files
committed
Update-Checkout Tests: Disable commit singing
Disabling commit signing on the local mock repo so that signing tools don't cause the tests to fail when the signing identity doesn't match the identity of the committer. Also marking the config changes as local to ensure that they don't affect the user's global config accidentally. Technically this isn't required since local is the default, but this ensures that it is clear and that we aren't making assumptions about the user's global git config.
1 parent 3860023 commit ab4df1b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/update_checkout/tests/scheme_mock.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ def setup_mock_remote(base_dir, base_config):
118118
call_quietly(['git', 'symbolic-ref', 'HEAD', 'refs/heads/main'],
119119
cwd=remote_repo_path)
120120
call_quietly(['git', 'clone', '-l', remote_repo_path, local_repo_path])
121-
call_quietly(['git', 'config', 'user.name', 'swift_test'],
121+
call_quietly(['git', 'config', '--local', 'user.name', 'swift_test'],
122122
cwd=local_repo_path)
123-
call_quietly(['git', 'config', 'user.email', '[email protected]'],
123+
call_quietly(['git', 'config', '--local', 'user.email', '[email protected]'],
124+
cwd=local_repo_path)
125+
call_quietly(['git', 'config', '--local', 'commit.gpgsign', 'false'],
124126
cwd=local_repo_path)
125127
call_quietly(['git', 'symbolic-ref', 'HEAD', 'refs/heads/main'],
126128
cwd=local_repo_path)

0 commit comments

Comments
 (0)