From 822f71b8d88011f224a19ed59518a9436dc08e77 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 9 Jan 2023 11:25:24 +0100 Subject: [PATCH] test: fix type error Fix this mypy typcheck error in the test builder: testScriptWithTypes:52: error: Argument 1 to "wait_until_tty_matches" of "Machine" has incompatible type "int"; expected "str" system1.wait_until_tty_matches(2, "login: ") This makes the test succeed again. --- test/integration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration.nix b/test/integration.nix index 7cb840c..90f8b8b 100644 --- a/test/integration.nix +++ b/test/integration.nix @@ -45,9 +45,9 @@ import "${nixpkgs}/nixos/tests/make-test-python.nix" ({ pkgs, ...}: { system1.wait_until_succeeds("[ $(fgconsole) = 2 ]") system1.wait_for_unit("getty@tty2.service") system1.wait_until_succeeds("pgrep -f 'agetty.*tty2'") - system1.wait_until_tty_matches(2, "login: ") + system1.wait_until_tty_matches("2", "login: ") system1.send_chars("${user}\n") - system1.wait_until_tty_matches(2, "login: ${user}") + system1.wait_until_tty_matches("2", "login: ${user}") system1.wait_until_succeeds("pgrep login") system1.sleep(2) system1.send_chars("${password}\n")