about summary refs log tree commit diff
path: root/nixos/tests/pam
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2022-06-04 12:22:03 +0800
committerBobby Rong <rjl931189261@126.com>2022-06-04 12:22:03 +0800
commit906b0b2e873d216881bb146c3353e76f1da132c2 (patch)
treef0288b8fc0836c72d3d9c1dde46079b15ba38d8f /nixos/tests/pam
parent9d2a8e31902241842c290bd82de9df82ad2d91a8 (diff)
nixos/tests: fix all tests that uses wait_until_tty_matches
Diffstat (limited to 'nixos/tests/pam')
-rw-r--r--nixos/tests/pam/pam-oath-login.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/nixos/tests/pam/pam-oath-login.nix b/nixos/tests/pam/pam-oath-login.nix
index c532e81e674d7..dd6ef4a0abcb8 100644
--- a/nixos/tests/pam/pam-oath-login.nix
+++ b/nixos/tests/pam/pam-oath-login.nix
@@ -77,28 +77,28 @@ in
     machine.screenshot("postboot")
 
     with subtest("Invalid password"):
-        switch_to_tty(2)
-        enter_user_alice(2)
+        switch_to_tty("2")
+        enter_user_alice("2")
 
         machine.send_chars("${oathSnakeOilPassword1}\n")
-        machine.wait_until_tty_matches(2, "Password: ")
+        machine.wait_until_tty_matches("2", "Password: ")
         machine.send_chars("blorg\n")
-        machine.wait_until_tty_matches(2, "Login incorrect")
+        machine.wait_until_tty_matches("2", "Login incorrect")
 
     with subtest("Invalid oath token"):
-        switch_to_tty(3)
-        enter_user_alice(3)
+        switch_to_tty("3")
+        enter_user_alice("3")
 
         machine.send_chars("000000\n")
-        machine.wait_until_tty_matches(3, "Login incorrect")
-        machine.wait_until_tty_matches(3, "login:")
+        machine.wait_until_tty_matches("3", "Login incorrect")
+        machine.wait_until_tty_matches("3", "login:")
 
     with subtest("Happy path: Both passwords are mandatory to get us in"):
-        switch_to_tty(4)
-        enter_user_alice(4)
+        switch_to_tty("4")
+        enter_user_alice("4")
 
         machine.send_chars("${oathSnakeOilPassword2}\n")
-        machine.wait_until_tty_matches(4, "Password: ")
+        machine.wait_until_tty_matches("4", "Password: ")
         machine.send_chars("${alicePassword}\n")
 
         machine.wait_until_succeeds("pgrep -u alice bash")