Skip to content

Commit

Permalink
Force disable GPG commit signing in tests (#41)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jake-Shadle authored Nov 6, 2023
1 parent e3c6ff1 commit 32d6b22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
]
Expand Down
5 changes: 5 additions & 0 deletions tests/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ impl FakeRemote {
.set_raw_value("committer", None, "email", "[email protected]")
.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()
}

Expand Down

0 comments on commit 32d6b22

Please sign in to comment.