mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
nixosTest/plasma5-systemd-start: init
This commit is contained in:
parent
2ab832c051
commit
0f57c4b952
@ -351,6 +351,7 @@ in
|
||||
php80 = handleTest ./php { php = pkgs.php80; };
|
||||
pinnwand = handleTest ./pinnwand.nix {};
|
||||
plasma5 = handleTest ./plasma5.nix {};
|
||||
plasma5-systemd-start = handleTest ./plasma5-systemd-start.nix {};
|
||||
plausible = handleTest ./plausible.nix {};
|
||||
pleroma = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./pleroma.nix {};
|
||||
plikd = handleTest ./plikd.nix {};
|
||||
|
43
nixos/tests/plasma5-systemd-start.nix
Normal file
43
nixos/tests/plasma5-systemd-start.nix
Normal file
@ -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'
|
||||
'';
|
||||
})
|
Loading…
Reference in New Issue
Block a user