From afeac2f099927e90db42c154613ca0ea8b1927f0 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 11 Dec 2018 12:32:40 +0000 Subject: [PATCH 1/2] Don't fail if GPG signing is configured by default --- testing/fixtures.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/testing/fixtures.py b/testing/fixtures.py index 2b2e280e..e7885632 100644 --- a/testing/fixtures.py +++ b/testing/fixtures.py @@ -48,7 +48,7 @@ def make_repo(tempdir_factory, repo_source): path = git_dir(tempdir_factory) copy_tree_to_path(get_resource_path(repo_source), path) cmd_output('git', 'add', '.', cwd=path) - cmd_output('git', 'commit', '-m', 'Add hooks', cwd=path) + cmd_output('git', 'commit', '--no-gpg-sign', '-m', 'Add hooks', cwd=path) return path @@ -64,7 +64,8 @@ def modify_manifest(path): with io.open(manifest_path, 'w') as manifest_file: manifest_file.write(ordered_dump(manifest, **C.YAML_DUMP_KWARGS)) cmd_output( - 'git', 'commit', '-am', 'update {}'.format(C.MANIFEST_FILE), cwd=path, + 'git', 'commit', '--no-gpg-sign', '-am', + 'update {}'.format(C.MANIFEST_FILE), cwd=path, ) @@ -80,7 +81,9 @@ def modify_config(path='.', commit=True): with io.open(config_path, 'w', encoding='UTF-8') as config_file: config_file.write(ordered_dump(config, **C.YAML_DUMP_KWARGS)) if commit: - cmd_output('git', 'commit', '-am', 'update config', cwd=path) + cmd_output( + 'git', 'commit', '--no-gpg-sign', '-am', 'update config', cwd=path, + ) def config_with_local_hooks(): @@ -136,13 +139,19 @@ def write_config(directory, config, config_file=C.CONFIG_FILE): def add_config_to_repo(git_path, config, config_file=C.CONFIG_FILE): write_config(git_path, config, config_file=config_file) cmd_output('git', 'add', config_file, cwd=git_path) - cmd_output('git', 'commit', '-m', 'Add hooks config', cwd=git_path) + cmd_output( + 'git', 'commit', '--no-gpg-sign', '-m', 'Add hooks config', + cwd=git_path, + ) return git_path def remove_config_from_repo(git_path, config_file=C.CONFIG_FILE): cmd_output('git', 'rm', config_file, cwd=git_path) - cmd_output('git', 'commit', '-m', 'Remove hooks config', cwd=git_path) + cmd_output( + 'git', 'commit', '--no-gpg-sign', '-m', 'Remove hooks config', + cwd=git_path, + ) return git_path From 15b1f118b5a4c97f5a804a053037de3f9f7d945e Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Fri, 14 Dec 2018 13:14:13 -0800 Subject: [PATCH 2/2] Update fixtures.py --- testing/fixtures.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/fixtures.py b/testing/fixtures.py index e7885632..287eb309 100644 --- a/testing/fixtures.py +++ b/testing/fixtures.py @@ -65,7 +65,8 @@ def modify_manifest(path): manifest_file.write(ordered_dump(manifest, **C.YAML_DUMP_KWARGS)) cmd_output( 'git', 'commit', '--no-gpg-sign', '-am', - 'update {}'.format(C.MANIFEST_FILE), cwd=path, + 'update {}'.format(C.MANIFEST_FILE), + cwd=path, )