mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: Improve TestSSH reliability on macOS (#3067)
Related issue: https://github.com/coder/coder/issues/2122
This commit is contained in:
committed by
GitHub
parent
6199e6a060
commit
4fde5366be
@ -91,6 +91,9 @@ func TestSSH(t *testing.T) {
|
||||
|
||||
// Shells on Mac, Windows, and Linux all exit shells with the "exit" command.
|
||||
pty.WriteLine("exit")
|
||||
// Read output to prevent hang on macOS, see:
|
||||
// https://github.com/coder/coder/issues/2122
|
||||
pty.ExpectMatch("exit")
|
||||
<-cmdDone
|
||||
})
|
||||
t.Run("Stdio", func(t *testing.T) {
|
||||
@ -224,6 +227,9 @@ func TestSSH(t *testing.T) {
|
||||
|
||||
// And we're done.
|
||||
pty.WriteLine("exit")
|
||||
// Read output to prevent hang on macOS, see:
|
||||
// https://github.com/coder/coder/issues/2122
|
||||
pty.ExpectMatch("exit")
|
||||
<-cmdDone
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user