diff options
author | davidak <davidak@users.noreply.github.com> | 2021-02-21 03:12:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 03:12:07 +0100 |
commit | 01148a5ba7128ca99f977625914c8e784b4fdcb2 (patch) | |
tree | a8d04f194eae037add07c4b56aedfd9ab6999386 /nixos | |
parent | 830ad1ac64080b5c6f09387d4f102e7980a123fd (diff) | |
parent | 6ee5348b5531d8621130686e4e4060ffe3ab009f (diff) |
Merge pull request #111642 from turion/dev_test_keepassxc
nixos/tests: add keepassxc
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/keepassxc.nix | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index c31a20e540883..89e2ee2722847 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -186,6 +186,7 @@ in k3s = handleTest ./k3s.nix {}; kafka = handleTest ./kafka.nix {}; keepalived = handleTest ./keepalived.nix {}; + keepassxc = handleTest ./keepassxc.nix {}; kerberos = handleTest ./kerberos/default.nix {}; kernel-latest = handleTest ./kernel-latest.nix {}; kernel-lts = handleTest ./kernel-lts.nix {}; diff --git a/nixos/tests/keepassxc.nix b/nixos/tests/keepassxc.nix new file mode 100644 index 0000000000000..98902187f6ac3 --- /dev/null +++ b/nixos/tests/keepassxc.nix @@ -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") + ''; +}) |