@@ -214,14 +214,17 @@ func TestReconnectingPTYSignedToken(t *testing.T) {
214
214
}
215
215
216
216
db , pubsub := dbtestutil .NewDB (t )
217
- client := coderdenttest .New (t , & coderdenttest.Options {
217
+ client , closer , api := coderdenttest .NewWithAPI (t , & coderdenttest.Options {
218
218
Options : & coderdtest.Options {
219
219
DeploymentValues : dv ,
220
220
Database : db ,
221
221
Pubsub : pubsub ,
222
222
IncludeProvisionerDaemon : true ,
223
223
},
224
224
})
225
+ t .Cleanup (func () {
226
+ closer .Close ()
227
+ })
225
228
226
229
user := coderdtest .CreateFirstUser (t , client )
227
230
_ = coderdenttest .AddLicense (t , client , coderdenttest.LicenseOptions {
@@ -253,19 +256,18 @@ func TestReconnectingPTYSignedToken(t *testing.T) {
253
256
t .Cleanup (func () {
254
257
_ = agentCloser .Close ()
255
258
})
256
-
257
259
coderdtest .AwaitWorkspaceAgents (t , client , workspace .ID )
258
260
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 )))
266
262
require .NoError (t , err )
267
263
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 ())
269
271
require .NoError (t , err )
270
272
if u .Scheme == "https" {
271
273
u .Scheme = "wss"
0 commit comments