Skip to content

Commit 12ffaff

Browse files
committed
SSH server now works on Windows
1 parent 722be6c commit 12ffaff

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

agent/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"time"
1313

1414
"cdr.dev/slog"
15-
"github.com/coder/coder/console/pty"
1615
"github.com/coder/coder/peer"
1716
"github.com/coder/coder/peerbroker"
17+
"github.com/coder/coder/pty"
1818
"github.com/coder/retry"
1919

2020
"github.com/gliderlabs/ssh"

agent/server_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,3 @@ func TestAgent(t *testing.T) {
6666
require.NoError(t, err)
6767
})
6868
}
69-
70-
// Read + write for input
71-
// Read + write for output

cli/clitest/clitest_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/coder/coder/cli/clitest"
1010
"github.com/coder/coder/coderd/coderdtest"
11-
"github.com/coder/coder/console"
11+
"github.com/coder/coder/pty/ptytest"
1212
)
1313

1414
func TestMain(m *testing.M) {
@@ -21,11 +21,12 @@ func TestCli(t *testing.T) {
2121
client := coderdtest.New(t)
2222
cmd, config := clitest.New(t)
2323
clitest.SetupConfig(t, client, config)
24-
cons := console.New(t, cmd)
24+
pty := ptytest.New(t)
25+
cmd.SetIn(pty.Input())
26+
cmd.SetOut(pty.Output())
2527
go func() {
2628
err := cmd.Execute()
2729
require.NoError(t, err)
2830
}()
29-
_, err := cons.ExpectString("coder")
30-
require.NoError(t, err)
31+
pty.ExpectMatch("coder")
3132
}

0 commit comments

Comments
 (0)