Merge pull request #122877 from primeos/nixos-tests-sway-gpg-agent-pinentry
nixos/tests/sway: test GPG's pinentry pop-up
This commit is contained in:
commit
89cc391728
1 changed files with 14 additions and 0 deletions
|
@ -38,6 +38,9 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
|
||||||
|
|
||||||
programs.sway.enable = true;
|
programs.sway.enable = true;
|
||||||
|
|
||||||
|
# To test pinentry via gpg-agent:
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
|
||||||
virtualisation.memorySize = 1024;
|
virtualisation.memorySize = 1024;
|
||||||
# Need to switch to a different VGA card / GPU driver than the default one (std) so that Sway can launch:
|
# 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" ];
|
virtualisation.qemu.options = [ "-vga virtio" ];
|
||||||
|
@ -80,6 +83,17 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
|
||||||
machine.send_key("alt-shift-q")
|
machine.send_key("alt-shift-q")
|
||||||
machine.wait_until_fails("pgrep alacritty")
|
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:
|
# Test swaynag:
|
||||||
machine.send_key("alt-shift-e")
|
machine.send_key("alt-shift-e")
|
||||||
machine.wait_for_text("You pressed the exit shortcut.")
|
machine.wait_for_text("You pressed the exit shortcut.")
|
||||||
|
|
Loading…
Reference in a new issue