diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2021-05-14 14:45:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 14:45:56 +0200 |
commit | 89cc391728876b394c04cf53c984260c3034617e (patch) | |
tree | 6efa8e76934cddce225b427a9799e3a47a2ab21f /nixos/tests | |
parent | 94b2848559b12a8ed1fe433084686b2a81123c99 (diff) | |
parent | 03808546e54b3e94d2eb3b4fdeb38864cb43dc0f (diff) | |
download | nixpkgs-89cc391728876b394c04cf53c984260c3034617e.tar nixpkgs-89cc391728876b394c04cf53c984260c3034617e.tar.gz nixpkgs-89cc391728876b394c04cf53c984260c3034617e.tar.bz2 nixpkgs-89cc391728876b394c04cf53c984260c3034617e.tar.lz nixpkgs-89cc391728876b394c04cf53c984260c3034617e.tar.xz nixpkgs-89cc391728876b394c04cf53c984260c3034617e.tar.zst nixpkgs-89cc391728876b394c04cf53c984260c3034617e.zip |
Merge pull request #122877 from primeos/nixos-tests-sway-gpg-agent-pinentry
nixos/tests/sway: test GPG's pinentry pop-up
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/sway.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/tests/sway.nix b/nixos/tests/sway.nix index fad7f7dc4e6..1d23b0e9431 100644 --- a/nixos/tests/sway.nix +++ b/nixos/tests/sway.nix @@ -38,6 +38,9 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : programs.sway.enable = true; + # To test pinentry via gpg-agent: + programs.gnupg.agent.enable = true; + virtualisation.memorySize = 1024; # Need to switch to a different VGA card / GPU driver than the default one (std) so that Sway can launch: virtualisation.qemu.options = [ "-vga virtio" ]; @@ -80,6 +83,17 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : machine.send_key("alt-shift-q") machine.wait_until_fails("pgrep alacritty") + # Test gpg-agent starting pinentry-gnome3 via D-Bus (tests if + # $WAYLAND_DISPLAY is correctly imported into the D-Bus user env): + machine.succeed( + "su - alice -c 'swaymsg -- exec gpg --no-tty --yes --quick-generate-key test'" + ) + machine.wait_until_succeeds("pgrep --exact gpg") + machine.wait_for_text("Passphrase") + machine.screenshot("gpg_pinentry") + machine.send_key("alt-shift-q") + machine.wait_until_fails("pgrep --exact gpg") + # Test swaynag: machine.send_key("alt-shift-e") machine.wait_for_text("You pressed the exit shortcut.") |