|
7 | 7 | "github.com/ory/dockertest/v3"
|
8 | 8 | "github.com/ory/dockertest/v3/docker"
|
9 | 9 |
|
| 10 | +"github.com/coder/coder/v2/agent" |
10 | 11 | "github.com/coder/coder/v2/agent/agenttest"
|
11 | 12 | "github.com/coder/coder/v2/cli/clitest"
|
12 | 13 | "github.com/coder/coder/v2/coderd/coderdtest"
|
@@ -59,9 +60,7 @@ func TestExpRpty(t *testing.T) {
|
59 | 60 | t.Parallel()
|
60 | 61 |
|
61 | 62 | client,workspace,agentToken:=setupWorkspaceForAgent(t)
|
62 |
| - |
63 | 63 | ctx:=testutil.Context(t,testutil.WaitLong)
|
64 |
| - |
65 | 64 | pool,err:=dockertest.NewPool("")
|
66 | 65 | require.NoError(t,err,"Could not connect to docker")
|
67 | 66 | ct,err:=pool.RunWithOptions(&dockertest.RunOptions{
|
@@ -92,11 +91,13 @@ func TestExpRpty(t *testing.T) {
|
92 | 91 | assert.NoError(t,err)
|
93 | 92 | })
|
94 | 93 |
|
95 |
| -_=agenttest.New(t,client.URL,agentToken) |
| 94 | +_=agenttest.New(t,client.URL,agentToken,func(o*agent.Options) { |
| 95 | +o.ExperimentalContainersEnabled=true |
| 96 | +}) |
96 | 97 | _=coderdtest.NewWorkspaceAgentWaiter(t,client,workspace.ID).Wait()
|
97 | 98 |
|
98 | 99 | pty.ExpectMatch(fmt.Sprintf("Connected to %s",workspace.Name))
|
99 |
| -pty.ExpectMatch("/ #") |
| 100 | +pty.ExpectMatch(" #") |
100 | 101 | pty.WriteLine("hostname")
|
101 | 102 | pty.ExpectMatch(ct.Container.Config.Hostname)
|
102 | 103 | pty.WriteLine("exit")
|
|