depot/third_party/nixpkgs/nixos/tests/ly.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

44 lines
1.1 KiB
Nix

import ./make-test-python.nix (
{ ... }:
{
name = "ly";
nodes.machine =
{ ... }:
{
imports = [ ./common/user-account.nix ];
services.displayManager.ly = {
enable = true;
settings = {
load = false;
save = false;
};
};
services.xserver.enable = true;
services.displayManager.defaultSession = "none+icewm";
services.xserver.windowManager.icewm.enable = true;
};
testScript =
{ nodes, ... }:
let
user = nodes.machine.users.users.alice;
in
''
start_all()
machine.wait_until_tty_matches("2", "password:")
machine.send_key("ctrl-alt-f2")
machine.sleep(1)
machine.screenshot("ly")
machine.send_chars("alice")
machine.send_key("tab")
machine.send_chars("${user.password}")
machine.send_key("ret")
machine.wait_for_file("/run/user/${toString user.uid}/lyxauth")
machine.succeed("xauth merge /run/user/${toString user.uid}/lyxauth")
machine.wait_for_window("^IceWM ")
machine.screenshot("icewm")
'';
}
)