Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2aec27

Browse files
authored
test: Fix scaletest/reconnectingpty commands for use in powershell (#5439)
1 parent 79c71d2 commit e2aec27

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scaletest/reconnectingpty/run_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ func Test_Runner(t *testing.T) {
3131
runner := reconnectingpty.NewRunner(client, reconnectingpty.Config{
3232
AgentID: agentID,
3333
Init: codersdk.ReconnectingPTYInit{
34-
Command: "echo 'hello world' && sleep 1",
34+
// Use ; here because it's powershell compatible (vs &&).
35+
Command: "echo 'hello world'; sleep 1",
3536
},
3637
LogOutput: true,
3738
})
@@ -195,7 +196,7 @@ func Test_Runner(t *testing.T) {
195196
runner := reconnectingpty.NewRunner(client, reconnectingpty.Config{
196197
AgentID: agentID,
197198
Init: codersdk.ReconnectingPTYInit{
198-
Command: "echo 'hello world' && sleep 1",
199+
Command: "echo 'hello world'; sleep 1",
199200
},
200201
ExpectOutput: "hello world",
201202
LogOutput: false,
@@ -219,7 +220,7 @@ func Test_Runner(t *testing.T) {
219220
runner := reconnectingpty.NewRunner(client, reconnectingpty.Config{
220221
AgentID: agentID,
221222
Init: codersdk.ReconnectingPTYInit{
222-
Command: "echo 'hello world' && sleep 1",
223+
Command: "echo 'hello world'; sleep 1",
223224
},
224225
ExpectOutput: "bello borld",
225226
LogOutput: false,

0 commit comments

Comments
 (0)