gpg-agent: fix and enable tests

main
oxalica 3 years ago committed by Robert Helgesson
parent 781d25b315
commit 78ff6b851c
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
  1. 1
      tests/default.nix
  2. 1
      tests/modules/services/gpg-agent/default-homedir.nix
  3. 5
      tests/modules/services/gpg-agent/override-homedir.nix

@ -131,6 +131,7 @@ import nmt {
./modules/services/fluidsynth
./modules/services/fnott
./modules/services/git-sync
./modules/services/gpg-agent
./modules/services/kanshi
./modules/services/lieer
./modules/services/pantalaimon

@ -5,6 +5,7 @@ with lib;
{
config = {
services.gpg-agent.enable = true;
services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package.
programs.gpg.enable = true;
test.stubs.gnupg = { };

@ -5,16 +5,17 @@ with lib;
{
config = {
services.gpg-agent.enable = true;
services.gpg-agent.pinentryFlavor = null; # Don't build pinentry package.
programs.gpg = {
enable = true;
homedir = "${config.home.homeDirectory}/foo/bar";
homedir = "/path/to/hash";
};
test.stubs.gnupg = { };
nmt.script = ''
in="${config.systemd.user.sockets.gpg-agent.Socket.ListenStream}"
if [[ $in != "%t/gnupg/d."????????????????????????"/S.gpg-agent" ]]
if [[ $in != "%t/gnupg/d.wp4h7ks5zxy4dodqadgpbbpz/S.gpg-agent" ]]
then
echo $in
fail "gpg-agent socket directory is malformed"

Loading…
Cancel
Save