diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2018-03-10 00:08:27 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2018-03-13 21:04:44 +0100 |
commit | 4f225f96d5a379e9955652e8867541ad04c297f6 (patch) | |
tree | 1357b1209f4df87d7aa58ed337945442cb865bfc /nixos/tests/xautolock.nix | |
parent | a724fcc8657ebe00f1161d95c3b601392368e187 (diff) | |
download | nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.tar nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.tar.gz nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.tar.bz2 nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.tar.lz nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.tar.xz nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.tar.zst nixpkgs-4f225f96d5a379e9955652e8867541ad04c297f6.zip |
xautolock: implement basic test to confirm functionality
Diffstat (limited to 'nixos/tests/xautolock.nix')
-rw-r--r-- | nixos/tests/xautolock.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/tests/xautolock.nix b/nixos/tests/xautolock.nix new file mode 100644 index 00000000000..ee46d9e05b0 --- /dev/null +++ b/nixos/tests/xautolock.nix @@ -0,0 +1,24 @@ +import ./make-test.nix ({ pkgs, lib, ... }: + +with lib; + +{ + name = "xautolock"; + meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ma27 ]; + + nodes.machine = { + imports = [ ./common/x11.nix ./common/user-account.nix ]; + + services.xserver.displayManager.auto.user = "bob"; + services.xserver.xautolock.enable = true; + services.xserver.xautolock.time = 1; + }; + + testScript = '' + $machine->start; + $machine->waitForX; + $machine->mustFail("pgrep xlock"); + $machine->sleep(120); + $machine->mustSucceed("pgrep xlock"); + ''; +}) |