diff --git a/tests/modules/programs/gh/credential-helper.git.conf b/tests/modules/programs/gh/credential-helper.git.conf index 529d6725..8b712cd8 100644 --- a/tests/modules/programs/gh/credential-helper.git.conf +++ b/tests/modules/programs/gh/credential-helper.git.conf @@ -1,5 +1,17 @@ +[commit] + gpgSign = false + [credential "https://github.com"] helper = "@gh@/bin/gh auth git-credential" [credential "https://github.example.com"] helper = "@gh@/bin/gh auth git-credential" + +[gpg] + format = "openpgp" + +[gpg "openpgp"] + program = "path-to-gpg" + +[tag] + gpgSign = false diff --git a/tests/modules/programs/gh/credential-helper.nix b/tests/modules/programs/gh/credential-helper.nix index 77157231..374d0b0a 100644 --- a/tests/modules/programs/gh/credential-helper.nix +++ b/tests/modules/programs/gh/credential-helper.nix @@ -9,7 +9,10 @@ }; }; - programs.git.enable = true; + programs.git = { + enable = true; + signing.signer = "path-to-gpg"; + }; test.stubs.gh = { }; diff --git a/tests/modules/programs/git/git-with-email-expected.conf b/tests/modules/programs/git/git-with-email-expected.conf index fa027422..d7c40973 100644 --- a/tests/modules/programs/git/git-with-email-expected.conf +++ b/tests/modules/programs/git/git-with-email-expected.conf @@ -1,3 +1,12 @@ +[commit] + gpgSign = false + +[gpg] + format = "openpgp" + +[gpg "openpgp"] + program = "path-to-gpg" + [sendemail "hm-account"] from = "H. M. Test Jr. " smtpEncryption = "tls" @@ -12,6 +21,9 @@ smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt" smtpUser = "home.manager" +[tag] + gpgSign = false + [user] email = "hm@example.com" name = "H. M. Test" diff --git a/tests/modules/programs/git/git-with-email.nix b/tests/modules/programs/git/git-with-email.nix index 0999eaa8..7135ce56 100644 --- a/tests/modules/programs/git/git-with-email.nix +++ b/tests/modules/programs/git/git-with-email.nix @@ -11,6 +11,7 @@ with lib; programs.git = { enable = true; package = pkgs.gitMinimal; + signing.signer = "path-to-gpg"; userEmail = "hm@example.com"; userName = "H. M. Test"; }; diff --git a/tests/modules/programs/git/git-with-msmtp-expected.conf b/tests/modules/programs/git/git-with-msmtp-expected.conf index 8cd5d86f..8cf588c7 100644 --- a/tests/modules/programs/git/git-with-msmtp-expected.conf +++ b/tests/modules/programs/git/git-with-msmtp-expected.conf @@ -1,3 +1,12 @@ +[commit] + gpgSign = false + +[gpg] + format = "openpgp" + +[gpg "openpgp"] + program = "path-to-gpg" + [sendemail "hm-account"] from = "H. M. Test Jr. " smtpEncryption = "tls" @@ -10,6 +19,9 @@ from = "H. M. Test " smtpServer = "@msmtp@/bin/msmtp" +[tag] + gpgSign = false + [user] email = "hm@example.com" name = "H. M. Test" diff --git a/tests/modules/programs/git/git-with-msmtp.nix b/tests/modules/programs/git/git-with-msmtp.nix index 80e082c9..e444f659 100644 --- a/tests/modules/programs/git/git-with-msmtp.nix +++ b/tests/modules/programs/git/git-with-msmtp.nix @@ -11,6 +11,7 @@ with lib; programs.git = { enable = true; package = pkgs.gitMinimal; + signing.signer = "path-to-gpg"; userEmail = "hm@example.com"; userName = "H. M. Test"; }; diff --git a/tests/modules/programs/git/git-with-str-extra-config-expected.conf b/tests/modules/programs/git/git-with-str-extra-config-expected.conf index 071268e8..2154bc58 100644 --- a/tests/modules/programs/git/git-with-str-extra-config-expected.conf +++ b/tests/modules/programs/git/git-with-str-extra-config-expected.conf @@ -1,5 +1,17 @@ This can be anything. +[commit] + gpgSign = false + +[gpg] + format = "openpgp" + +[gpg "openpgp"] + program = "path-to-gpg" + +[tag] + gpgSign = false + [user] email = "user@example.org" name = "John Doe" diff --git a/tests/modules/programs/git/git-with-str-extra-config.nix b/tests/modules/programs/git/git-with-str-extra-config.nix index b2294c65..b8bcb950 100644 --- a/tests/modules/programs/git/git-with-str-extra-config.nix +++ b/tests/modules/programs/git/git-with-str-extra-config.nix @@ -7,6 +7,7 @@ with lib; programs.git = { enable = true; package = pkgs.gitMinimal; + signing.signer = "path-to-gpg"; extraConfig = '' This can be anything. ''; diff --git a/tests/modules/programs/git/git-without-signing-key-id-expected.conf b/tests/modules/programs/git/git-without-signing-key-id-expected.conf index 8c04aeda..29452a2d 100644 --- a/tests/modules/programs/git/git-without-signing-key-id-expected.conf +++ b/tests/modules/programs/git/git-without-signing-key-id-expected.conf @@ -2,6 +2,9 @@ gpgSign = true [gpg] + format = "openpgp" + +[gpg "openpgp"] program = "path-to-gpg" [tag] diff --git a/tests/modules/programs/git/git-without-signing-key-id.nix b/tests/modules/programs/git/git-without-signing-key-id.nix index 3428c40d..f726f2ff 100644 --- a/tests/modules/programs/git/git-without-signing-key-id.nix +++ b/tests/modules/programs/git/git-without-signing-key-id.nix @@ -6,7 +6,7 @@ userEmail = "user@example.org"; signing = { - gpgPath = "path-to-gpg"; + signer = "path-to-gpg"; key = null; signByDefault = true; };