diff options
author | oxalica <oxalicc@pm.me> | 2021-11-01 04:34:10 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2021-11-02 09:57:52 +0800 |
commit | 0f57c4b9529b840d8d3a1e2349513535f3b7adc7 (patch) | |
tree | 61b7f14354d3e0ebb31a17cfa0c447b3ab5d9c00 /nixos/tests/plasma5-systemd-start.nix | |
parent | 2ab832c051636f24f4aa09d466d3db7979bdf2b2 (diff) | |
download | nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.tar nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.tar.gz nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.tar.bz2 nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.tar.lz nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.tar.xz nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.tar.zst nixpkgs-0f57c4b9529b840d8d3a1e2349513535f3b7adc7.zip |
nixosTest/plasma5-systemd-start: init
Diffstat (limited to 'nixos/tests/plasma5-systemd-start.nix')
-rw-r--r-- | nixos/tests/plasma5-systemd-start.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/nixos/tests/plasma5-systemd-start.nix b/nixos/tests/plasma5-systemd-start.nix new file mode 100644 index 00000000000..ac6fad7da6c --- /dev/null +++ b/nixos/tests/plasma5-systemd-start.nix @@ -0,0 +1,43 @@ +import ./make-test-python.nix ({ pkgs, ...} : + +{ + name = "plasma5-systemd-start"; + meta = with pkgs.lib.maintainers; { + maintainers = [ oxalica ]; + }; + + machine = { ... }: + + { + imports = [ ./common/user-account.nix ]; + services.xserver = { + enable = true; + displayManager.sddm.enable = true; + displayManager.defaultSession = "plasma"; + desktopManager.plasma5.enable = true; + desktopManager.plasma5.runUsingSystemd = true; + displayManager.autoLogin = { + enable = true; + user = "alice"; + }; + }; + virtualisation.memorySize = 1024; + }; + + testScript = { nodes, ... }: let + user = nodes.machine.config.users.users.alice; + in '' + with subtest("Wait for login"): + start_all() + machine.wait_for_file("${user.home}/.Xauthority") + machine.succeed("xauth merge ${user.home}/.Xauthority") + + with subtest("Check plasmashell started"): + machine.wait_until_succeeds("pgrep plasmashell") + machine.wait_for_window("^Desktop ") + + status, result = machine.systemctl('--no-pager show plasma-plasmashell.service', user='alice') + assert status == 0, 'Service not found' + assert 'ActiveState=active' in result.split('\n'), 'Systemd service not active' + ''; +}) |