diff options
author | Manuel Bärenz <programming@manuelbaerenz.de> | 2021-02-02 12:35:46 +0100 |
---|---|---|
committer | Manuel Bärenz <programming@manuelbaerenz.de> | 2021-02-08 15:39:37 +0100 |
commit | 6ee5348b5531d8621130686e4e4060ffe3ab009f (patch) | |
tree | 4dbf9faf5a1868687a4a6dccf4d696007a6b274f | |
parent | 3ed5570514429b1d32c59dc4a82e74a249d8818a (diff) | |
download | nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.tar nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.tar.gz nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.tar.bz2 nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.tar.lz nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.tar.xz nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.tar.zst nixpkgs-6ee5348b5531d8621130686e4e4060ffe3ab009f.zip |
nixos/tests: add keepassxc
Test whether KeePassXC launches correctly.
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/keepassxc.nix | 34 | ||||
-rw-r--r-- | pkgs/applications/misc/keepassx/community.nix | 4 |
3 files changed, 39 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 4ea2dc44d5a..775413080eb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -185,6 +185,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 00000000000..98902187f6a --- /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") + ''; +}) diff --git a/pkgs/applications/misc/keepassx/community.nix b/pkgs/applications/misc/keepassx/community.nix index c7e87dbbfd4..af259c199d8 100644 --- a/pkgs/applications/misc/keepassx/community.nix +++ b/pkgs/applications/misc/keepassx/community.nix @@ -34,6 +34,8 @@ , withKeePassNetworking ? true , withKeePassTouchID ? true , withKeePassFDOSecrets ? true + +, nixosTests }: with lib; @@ -118,6 +120,8 @@ stdenv.mkDerivation rec { wrapQtApp $out/Applications/KeePassXC.app/Contents/MacOS/KeePassXC ''; + passthru.tests = nixosTests.keepassxc; + meta = { description = "Password manager to store your passwords safely and auto-type them into your everyday websites and applications"; longDescription = "A community fork of KeePassX, which is itself a port of KeePass Password Safe. The goal is to extend and improve KeePassX with new features and bugfixes to provide a feature-rich, fully cross-platform and modern open-source password manager. Accessible via native cross-platform GUI, CLI, and browser integration with the KeePassXC Browser Extension (https://github.com/keepassxreboot/keepassxc-browser)."; |