mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
fix: Add command to reconnecting PTY (#1860)
This fixes #1708 and opens the door for PTYs to execute non-shell commands!
This commit is contained in:
@ -221,7 +221,7 @@ func TestAgent(t *testing.T) {
|
||||
|
||||
conn := setupAgent(t, agent.Metadata{}, 0)
|
||||
id := uuid.NewString()
|
||||
netConn, err := conn.ReconnectingPTY(id, 100, 100)
|
||||
netConn, err := conn.ReconnectingPTY(id, 100, 100, "/bin/bash")
|
||||
require.NoError(t, err)
|
||||
bufRead := bufio.NewReader(netConn)
|
||||
|
||||
@ -259,7 +259,7 @@ func TestAgent(t *testing.T) {
|
||||
expectLine(matchEchoOutput)
|
||||
|
||||
_ = netConn.Close()
|
||||
netConn, err = conn.ReconnectingPTY(id, 100, 100)
|
||||
netConn, err = conn.ReconnectingPTY(id, 100, 100, "/bin/bash")
|
||||
require.NoError(t, err)
|
||||
bufRead = bufio.NewReader(netConn)
|
||||
|
||||
|
Reference in New Issue
Block a user