Assure tests don't pick up the developers signing configuration.

Otherwise tests will end up signing commits which is slow and
a side-effect we should test for explicitly.
This commit is contained in:
Sebastian Thiel 2024-05-26 10:49:47 +02:00
parent 6224c70695
commit 9270ad9c1f
No known key found for this signature in database
GPG Key ID: 9CB5EE7895E8268B

View File

@ -162,6 +162,11 @@ pub fn test_repository() -> (gitbutler_core::git::Repository, TempDir) {
let tmp = temp_dir();
let repository = gitbutler_core::git::Repository::init_opts(&tmp, &init_opts())
.expect("failed to init repository");
repository
.config()
.unwrap()
.set_local("commit.gpgsign", "false")
.unwrap();
let mut index = repository.index().expect("failed to get index");
let oid = index.write_tree().expect("failed to write tree");
let signature = gitbutler_core::git::Signature::now("test", "test@email.com").unwrap();