Skip to content

fix: Agent/SessionTTY flake waiting for terminal prompt #1002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ func TestAgent(t *testing.T) {
t.Run("SessionTTY", func(t *testing.T) {
t.Parallel()
session := setupSSHSession(t)
prompt := "$"
command := "bash"
if runtime.GOOS == "windows" {
command = "cmd.exe"
prompt = ">"
}
err := session.RequestPty("xterm", 128, 128, ssh.TerminalModes{})
require.NoError(t, err)
Expand All @@ -78,7 +76,6 @@ func TestAgent(t *testing.T) {
session.Stdin = ptty.Input()
err = session.Start(command)
require.NoError(t, err)
ptty.ExpectMatch(prompt)
ptty.WriteLine("echo test")
ptty.ExpectMatch("test")
ptty.WriteLine("exit")
Expand Down