|
7 | 7 | "github.com/stretchr/testify/assert"
|
8 | 8 | "github.com/stretchr/testify/require"
|
9 | 9 |
|
10 |
| - "cdr.dev/slog" |
11 |
| - |
12 | 10 | "github.com/coder/coder/cli/clitest"
|
13 | 11 | "github.com/coder/coder/coderd/coderdtest"
|
14 | 12 | "github.com/coder/coder/provisioner/echo"
|
@@ -67,11 +65,11 @@ func TestWorkspaceAgent(t *testing.T) {
|
67 | 65 | if assert.NotEmpty(t, workspace.LatestBuild.Resources) && assert.NotEmpty(t, resources[0].Agents) {
|
68 | 66 | assert.NotEmpty(t, resources[0].Agents[0].Version)
|
69 | 67 | }
|
70 |
| - dialer, err := client.DialWorkspaceAgentTailnet(ctx, slog.Logger{}, resources[0].Agents[0].ID) |
| 68 | + dialer, err := client.DialWorkspaceAgent(ctx, resources[0].Agents[0].ID, nil) |
71 | 69 | require.NoError(t, err)
|
72 | 70 | defer dialer.Close()
|
73 | 71 | require.Eventually(t, func() bool {
|
74 |
| - _, err := dialer.Ping() |
| 72 | + _, err := dialer.Ping(ctx) |
75 | 73 | return err == nil
|
76 | 74 | }, testutil.WaitMedium, testutil.IntervalFast)
|
77 | 75 | cancelFunc()
|
@@ -128,11 +126,11 @@ func TestWorkspaceAgent(t *testing.T) {
|
128 | 126 | if assert.NotEmpty(t, resources) && assert.NotEmpty(t, resources[0].Agents) {
|
129 | 127 | assert.NotEmpty(t, resources[0].Agents[0].Version)
|
130 | 128 | }
|
131 |
| - dialer, err := client.DialWorkspaceAgentTailnet(ctx, slog.Logger{}, resources[0].Agents[0].ID) |
| 129 | + dialer, err := client.DialWorkspaceAgent(ctx, resources[0].Agents[0].ID, nil) |
132 | 130 | require.NoError(t, err)
|
133 | 131 | defer dialer.Close()
|
134 | 132 | require.Eventually(t, func() bool {
|
135 |
| - _, err := dialer.Ping() |
| 133 | + _, err := dialer.Ping(ctx) |
136 | 134 | return err == nil
|
137 | 135 | }, testutil.WaitMedium, testutil.IntervalFast)
|
138 | 136 | cancelFunc()
|
@@ -189,11 +187,11 @@ func TestWorkspaceAgent(t *testing.T) {
|
189 | 187 | if assert.NotEmpty(t, resources) && assert.NotEmpty(t, resources[0].Agents) {
|
190 | 188 | assert.NotEmpty(t, resources[0].Agents[0].Version)
|
191 | 189 | }
|
192 |
| - dialer, err := client.DialWorkspaceAgentTailnet(ctx, slog.Logger{}, resources[0].Agents[0].ID) |
| 190 | + dialer, err := client.DialWorkspaceAgent(ctx, resources[0].Agents[0].ID, nil) |
193 | 191 | require.NoError(t, err)
|
194 | 192 | defer dialer.Close()
|
195 | 193 | require.Eventually(t, func() bool {
|
196 |
| - _, err := dialer.Ping() |
| 194 | + _, err := dialer.Ping(ctx) |
197 | 195 | return err == nil
|
198 | 196 | }, testutil.WaitMedium, testutil.IntervalFast)
|
199 | 197 | cancelFunc()
|
|
0 commit comments