mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-11 12:16:42 +02:00
tests: auto-login with getty
This commit is contained in:
parent
5db3da85a3
commit
db75a7e29a
@ -6,7 +6,7 @@ self.inputs.nixpkgs.lib.nixos.runTest {
|
|||||||
node.specialArgs.nix-config = self;
|
node.specialArgs.nix-config = self;
|
||||||
|
|
||||||
nodes.machine =
|
nodes.machine =
|
||||||
{ nix-config, ... }:
|
{ nix-config, config, ... }:
|
||||||
{
|
{
|
||||||
imports = with nix-config.nixosModules; [
|
imports = with nix-config.nixosModules; [
|
||||||
shell
|
shell
|
||||||
@ -16,21 +16,14 @@ self.inputs.nixpkgs.lib.nixos.runTest {
|
|||||||
home-manager.sharedModules = with nix-config.homeModules; [
|
home-manager.sharedModules = with nix-config.homeModules; [
|
||||||
neovim
|
neovim
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.getty.autologinUser = config.modules.system.username;
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = # python
|
testScript = # python
|
||||||
''
|
''
|
||||||
machine.wait_for_unit("default.target")
|
machine.wait_for_unit("default.target")
|
||||||
|
|
||||||
machine.send_chars("user")
|
|
||||||
machine.sleep(1)
|
|
||||||
machine.send_key("ret")
|
|
||||||
machine.sleep(1)
|
|
||||||
machine.send_chars("user")
|
|
||||||
machine.sleep(1)
|
|
||||||
machine.send_key("ret")
|
|
||||||
machine.sleep(5)
|
|
||||||
|
|
||||||
machine.send_chars("nvim hello.txt")
|
machine.send_chars("nvim hello.txt")
|
||||||
machine.sleep(1)
|
machine.sleep(1)
|
||||||
machine.send_key("ret")
|
machine.send_key("ret")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user