test(ssh): read the command's line, not the PTY reply, in the remote-folder session test (#8306)

ssh_session_in_a_directory_starts_the_login_shell_there read only up to the first newline, which on Linux is the test server's separate pty 80x24 reply, so it failed there every time. It now reads up to the end of the command's line.

Co-authored-by: audichuang <[email protected]>
Цей коміт міститься в:
audichuang authored and GitHub committed 2026-12-06 06:41:40 +08:00
1 джерело 7a05e2aab0
коміт df03de46ed
1 file changed
+2 -1
+2 -1
Переглянути файл
@@ -148,7 +148,8 @@ async fn ssh_session_in_a_directory_starts_the_login_shell_there() {
)
.await
.unwrap();
let out = read_until(&output, "\n");
// The server answers the PTY request ("pty 80x24") first, in its own packet on Linux.
let out = read_until(&output, "-l\n");
assert!(out.contains(r#"ran: cd -- ~/'my app'\''s'; exec "${SHELL:-/bin/sh}" -l"#), "{out:?}");
host.shutdown().await;
}