From af3aef919e7bb6b773fe257f2fab1fc898060f9d Mon Sep 17 00:00:00 2001 From: Tom Herbers Date: Sat, 16 May 2026 19:55:06 +0200 Subject: [PATCH] nixos/tests/gnupg: fix prompt handling Apparently the first characters are missing and therefore it never matches. Work around this by modifying the search string. --- nixos/tests/gnupg.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/gnupg.nix b/nixos/tests/gnupg.nix index 1c720b2d6b84..5f3e731508d4 100644 --- a/nixos/tests/gnupg.nix +++ b/nixos/tests/gnupg.nix @@ -77,7 +77,7 @@ machine.send_chars("pgp_p4ssphrase") machine.wait_until_tty_matches("1", "Passphrases match") machine.send_chars("\n") - machine.wait_until_tty_matches("1", "public and secret key created") + machine.wait_until_tty_matches("1", "secret key created and signed") with subtest("Confirm the key is in the keyring"): machine.wait_until_succeeds(as_alice("gpg --list-secret-keys | grep -q alice@machine")) @@ -92,7 +92,7 @@ # Note: again, this needs a tty because of pinentry machine.send_chars("ssh-add alice\n") - machine.wait_until_tty_matches("1", "Enter passphrase") + machine.wait_until_tty_matches("1", "passphrase for") machine.send_chars("ssh_p4ssphrase\n") machine.wait_until_tty_matches("1", "Please enter") machine.send_chars("ssh_agent_p4ssphrase")