upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/git/mod.rs11
-rw-r--r--src/purgatory/helpers.rs13
-rw-r--r--tests/common/purgatory_helpers.rs4
3 files changed, 28 insertions, 0 deletions
diff --git a/src/git/mod.rs b/src/git/mod.rs
index 205e3bc..b3fee69 100644
--- a/src/git/mod.rs
+++ b/src/git/mod.rs
@@ -535,6 +535,17 @@ mod tests {
535 .current_dir(&work_dir) 535 .current_dir(&work_dir)
536 .output() 536 .output()
537 .unwrap(); 537 .unwrap();
538 // Disable GPG signing for tests (prevents yubikey prompts)
539 Command::new("git")
540 .args(["config", "commit.gpgsign", "false"])
541 .current_dir(&work_dir)
542 .output()
543 .unwrap();
544 Command::new("git")
545 .args(["config", "tag.gpgsign", "false"])
546 .current_dir(&work_dir)
547 .output()
548 .unwrap();
538 549
539 // Create a file and commit 550 // Create a file and commit
540 fs::write(work_dir.join("README.md"), "# Test").unwrap(); 551 fs::write(work_dir.join("README.md"), "# Test").unwrap();
diff --git a/src/purgatory/helpers.rs b/src/purgatory/helpers.rs
index 2e53778..93dc378 100644
--- a/src/purgatory/helpers.rs
+++ b/src/purgatory/helpers.rs
@@ -534,6 +534,19 @@ mod tests {
534 .output() 534 .output()
535 .expect("Failed to set name"); 535 .expect("Failed to set name");
536 536
537 // Disable GPG signing for tests (prevents yubikey prompts)
538 Command::new("git")
539 .args(["config", "commit.gpgsign", "false"])
540 .current_dir(work_dir.path())
541 .output()
542 .expect("Failed to disable commit.gpgsign");
543
544 Command::new("git")
545 .args(["config", "tag.gpgsign", "false"])
546 .current_dir(work_dir.path())
547 .output()
548 .expect("Failed to disable tag.gpgsign");
549
537 // Create a commit 550 // Create a commit
538 std::fs::write(work_dir.path().join("file.txt"), "content").unwrap(); 551 std::fs::write(work_dir.path().join("file.txt"), "content").unwrap();
539 Command::new("git") 552 Command::new("git")
diff --git a/tests/common/purgatory_helpers.rs b/tests/common/purgatory_helpers.rs
index fa1be73..125f485 100644
--- a/tests/common/purgatory_helpers.rs
+++ b/tests/common/purgatory_helpers.rs
@@ -51,6 +51,10 @@ pub fn create_test_repo_with_commit(path: &Path, variant: CommitVariant) -> Resu
51 // Configure git user for commits 51 // Configure git user for commits
52 run_git(path, &["config", "user.email", "test@example.com"])?; 52 run_git(path, &["config", "user.email", "test@example.com"])?;
53 run_git(path, &["config", "user.name", "Test User"])?; 53 run_git(path, &["config", "user.name", "Test User"])?;
54
55 // Disable GPG signing for tests (prevents yubikey prompts)
56 run_git(path, &["config", "commit.gpgsign", "false"])?;
57 run_git(path, &["config", "tag.gpgsign", "false"])?;
54 58
55 // Create a file based on variant 59 // Create a file based on variant
56 let (filename, content) = match variant { 60 let (filename, content) = match variant {