Skip to content

Commit 3680e15

Browse files
authored
chore: fix lint in main caused by incompatible merge (coder#7239)
1 parent 4353ad7 commit 3680e15

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

enterprise/coderd/workspaceproxy_test.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,17 @@ func TestReconnectingPTYSignedToken(t *testing.T) {
214214
}
215215

216216
db, pubsub := dbtestutil.NewDB(t)
217-
client := coderdenttest.New(t, &coderdenttest.Options{
217+
client, closer, api := coderdenttest.NewWithAPI(t, &coderdenttest.Options{
218218
Options: &coderdtest.Options{
219219
DeploymentValues: dv,
220220
Database: db,
221221
Pubsub: pubsub,
222222
IncludeProvisionerDaemon: true,
223223
},
224224
})
225+
t.Cleanup(func() {
226+
closer.Close()
227+
})
225228

226229
user := coderdtest.CreateFirstUser(t, client)
227230
_ = coderdenttest.AddLicense(t, client, coderdenttest.LicenseOptions{
@@ -253,19 +256,18 @@ func TestReconnectingPTYSignedToken(t *testing.T) {
253256
t.Cleanup(func() {
254257
_ = agentCloser.Close()
255258
})
256-
257259
coderdtest.AwaitWorkspaceAgents(t, client, workspace.ID)
258260

259-
createProxyCtx := testutil.Context(t, testutil.WaitLong)
260-
proxyRes, err := client.CreateWorkspaceProxy(createProxyCtx, codersdk.CreateWorkspaceProxyRequest{
261-
Name: namesgenerator.GetRandomName(1),
262-
Icon: "/emojis/flag.png",
263-
URL: "https://" + namesgenerator.GetRandomName(1) + ".com",
264-
WildcardHostname: "*.sub.example.com",
265-
})
261+
proxyURL, err := url.Parse(fmt.Sprintf("https://%s.com", namesgenerator.GetRandomName(1)))
266262
require.NoError(t, err)
267263

268-
u, err := url.Parse(proxyRes.Proxy.URL)
264+
_ = coderdenttest.NewWorkspaceProxy(t, api, client, &coderdenttest.ProxyOptions{
265+
Name: namesgenerator.GetRandomName(1),
266+
ProxyURL: proxyURL,
267+
AppHostname: "*.sub.example.com",
268+
})
269+
270+
u, err := url.Parse(proxyURL.String())
269271
require.NoError(t, err)
270272
if u.Scheme == "https" {
271273
u.Scheme = "wss"

0 commit comments

Comments
 (0)