nixos/tests: add keepassxc

Test whether KeePassXC launches correctly.
This commit is contained in:
Manuel Bärenz
2021-02-08 15:39:37 +01:00
parent 3ed5570514
commit 6ee5348b55
3 changed files with 39 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import ./make-test-python.nix ({ pkgs, ...} :
{
name = "keepassxc";
meta = with pkgs.lib.maintainers; {
maintainers = [ turion ];
};
machine = { ... }:
{
imports = [
./common/user-account.nix
./common/x11.nix
];
services.xserver.enable = true;
test-support.displayManager.auto.user = "alice";
environment.systemPackages = [ pkgs.keepassxc ];
};
enableOCR = true;
testScript = { nodes, ... }: ''
start_all()
machine.wait_for_x()
# start KeePassXC window
machine.execute("su - alice -c keepassxc &")
machine.wait_for_text("KeePassXC ${pkgs.keepassxc.version}")
machine.screenshot("KeePassXC")
'';
})