From db75a7e29a0a0cc68fdbc7a037f1903c4f94785e Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Tue, 15 Oct 2024 23:01:19 -0400 Subject: [PATCH] tests: auto-login with getty --- tests/neovim.nix | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/neovim.nix b/tests/neovim.nix index 23b5d27f..f691b51d 100644 --- a/tests/neovim.nix +++ b/tests/neovim.nix @@ -6,7 +6,7 @@ self.inputs.nixpkgs.lib.nixos.runTest { node.specialArgs.nix-config = self; nodes.machine = - { nix-config, ... }: + { nix-config, config, ... }: { imports = with nix-config.nixosModules; [ shell @@ -16,21 +16,14 @@ self.inputs.nixpkgs.lib.nixos.runTest { home-manager.sharedModules = with nix-config.homeModules; [ neovim ]; + + services.getty.autologinUser = config.modules.system.username; }; testScript = # python '' 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.sleep(1) machine.send_key("ret")