Skip to content

Commit afe0bdf

Browse files
committed
fix: Do not sign commits in tests
1 parent 1f6b644 commit afe0bdf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/hooks/test_git_hook.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def repo(repo_dir, dbt_project_file, test_files, profiles_file, repo_branch):
332332
repo.get_worktree().stage(f"{test_file.parent.name}/{test_file.name}")
333333

334334
repo.get_worktree().commit(
335-
b"Test first commit", committer=b"Test user <test@user.com>"
335+
b"Test first commit", committer=b"Test user <test@user.com>", sign=False
336336
)
337337

338338
yield repo
@@ -439,6 +439,12 @@ def upload_only_target(u: URL):
439439
server_address, server_port = git_server
440440
destination = URL(f"git://{server_address}:{server_port}/{repo_name}")
441441

442+
repo = Repo(repo_dir)
443+
config = repo.get_config()
444+
config.set((b"commit",), b"gpgsign", False)
445+
config.write_to_path()
446+
repo.close()
447+
442448
fs_hook.upload_dbt_project(str(repo_dir), destination)
443449

444450
new_repo_path = tmp_path / "new_repo"

0 commit comments

Comments
 (0)