From 32d6b224c3508f97863369ae90a9ee9d9ddad997 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Mon, 6 Nov 2023 13:24:00 +0100 Subject: [PATCH] Force disable GPG commit signing in tests (#41) By default gix will honor the user's settings (repo, global etc) but this breaks testing if the user has GPG signing enabled, which causes the commit ids to be different from what's expected. Resolves: #29 --- Cargo.toml | 2 +- deny.toml | 2 +- tests/git.rs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 218c9e2..141b970 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ twox-hash = { version = "1.6", default-features = false } [dependencies.gix] optional = true -version = "0.54" +version = "0.55" default-features = false features = ["blocking-http-transport-reqwest"] diff --git a/deny.toml b/deny.toml index 66866ac..ece65ef 100644 --- a/deny.toml +++ b/deny.toml @@ -51,7 +51,7 @@ skip = [ # toml-edit is user a newer version :p { name = "indexmap", version = "=1.9.3" }, # trust-dns-resolver pulls in a new version than the rest of them use (including itself) - { name = "socket2", version = "=0.4.9" }, + { name = "socket2", version = "=0.4.10" }, # A bunch of users still of syn 1.0 :p { name = "syn", version = "=1.0.109" }, ] diff --git a/tests/git.rs b/tests/git.rs index 210e0b3..eb74313 100644 --- a/tests/git.rs +++ b/tests/git.rs @@ -205,6 +205,11 @@ impl FakeRemote { .set_raw_value("committer", None, "email", "tests@integration.se") .unwrap(); + // Disable GPG signing, it breaks testing if the user has it enabled + config + .set_raw_value("commit", None, "gpgsign", "false") + .unwrap(); + config.commit_auto_rollback().unwrap() }