@@ -36,10 +36,10 @@ func TestAIBridgeListInterceptions(t *testing.T) {
3636 Features : license.Features {},
3737 },
3838 })
39- experimentalClient := codersdk .NewExperimentalClient (client )
4039
4140 ctx := testutil .Context (t , testutil .WaitLong )
42- _ , err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
41+ //nolint:gocritic // Owner role is irrelevant here.
42+ _ , err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
4343 var sdkErr * codersdk.Error
4444 require .ErrorAs (t , err , & sdkErr )
4545 require .Equal (t , http .StatusForbidden , sdkErr .StatusCode ())
@@ -59,9 +59,9 @@ func TestAIBridgeListInterceptions(t *testing.T) {
5959 },
6060 },
6161 })
62- experimentalClient := codersdk .NewExperimentalClient (client )
6362 ctx := testutil .Context (t , testutil .WaitLong )
64- res , err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
63+ //nolint:gocritic // Owner role is irrelevant here.
64+ res , err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
6565 require .NoError (t , err )
6666 require .Empty (t , res .Results )
6767 })
@@ -79,7 +79,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
7979 },
8080 },
8181 })
82- experimentalClient := codersdk .NewExperimentalClient (client )
8382 ctx := testutil .Context (t , testutil .WaitLong )
8483
8584 user1 , err := client .User (ctx , codersdk .Me )
@@ -140,7 +139,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
140139 i1SDK := db2sdk .AIBridgeInterception (i1 , user1Visible , []database.AIBridgeTokenUsage {i1tok2 , i1tok1 }, []database.AIBridgeUserPrompt {i1up2 , i1up1 }, []database.AIBridgeToolUsage {i1tool2 , i1tool1 })
141140 i2SDK := db2sdk .AIBridgeInterception (i2 , user2Visible , nil , nil , nil )
142141
143- res , err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
142+ res , err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
144143 require .NoError (t , err )
145144 require .Len (t , res .Results , 2 )
146145 require .Equal (t , i2SDK .ID , res .Results [0 ].ID )
@@ -190,7 +189,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
190189 },
191190 },
192191 })
193- experimentalClient := codersdk .NewExperimentalClient (client )
194192 ctx := testutil .Context (t , testutil .WaitLong )
195193
196194 allInterceptionIDs := make ([]uuid.UUID , 0 , 20 )
@@ -221,7 +219,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
221219 }
222220
223221 // Try to fetch with an invalid limit.
224- res , err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
222+ res , err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
225223 Pagination : codersdk.Pagination {
226224 Limit : 1001 ,
227225 },
@@ -232,7 +230,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
232230 require .Empty (t , res .Results )
233231
234232 // Try to fetch with both after_id and offset pagination.
235- res , err = experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
233+ res , err = client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
236234 Pagination : codersdk.Pagination {
237235 AfterID : allInterceptionIDs [0 ],
238236 Offset : 1 ,
@@ -265,7 +263,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
265263 } else {
266264 pagination .Offset = len (interceptionIDs )
267265 }
268- res , err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
266+ res , err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
269267 Pagination : pagination ,
270268 })
271269 require .NoError (t , err )
@@ -305,11 +303,9 @@ func TestAIBridgeListInterceptions(t *testing.T) {
305303 },
306304 },
307305 })
308- adminExperimentalClient := codersdk .NewExperimentalClient (adminClient )
309306 ctx := testutil .Context (t , testutil .WaitLong )
310307
311308 secondUserClient , secondUser := coderdtest .CreateAnotherUser (t , adminClient , firstUser .OrganizationID )
312- secondUserExperimentalClient := codersdk .NewExperimentalClient (secondUserClient )
313309
314310 now := dbtime .Now ()
315311 i1 := dbgen .AIBridgeInterception (t , db , database.InsertAIBridgeInterceptionParams {
@@ -322,15 +318,15 @@ func TestAIBridgeListInterceptions(t *testing.T) {
322318 }, & now )
323319
324320 // Admin can see all interceptions.
325- res , err := adminExperimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
321+ res , err := adminClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
326322 require .NoError (t , err )
327323 require .EqualValues (t , 2 , res .Count )
328324 require .Len (t , res .Results , 2 )
329325 require .Equal (t , i1 .ID , res .Results [0 ].ID )
330326 require .Equal (t , i2 .ID , res .Results [1 ].ID )
331327
332328 // Second user can only see their own interceptions.
333- res , err = secondUserExperimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
329+ res , err = secondUserClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {})
334330 require .NoError (t , err )
335331 require .EqualValues (t , 1 , res .Count )
336332 require .Len (t , res .Results , 1 )
@@ -350,7 +346,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
350346 },
351347 },
352348 })
353- experimentalClient := codersdk .NewExperimentalClient (client )
354349 ctx := testutil .Context (t , testutil .WaitLong )
355350
356351 user1 , err := client .User (ctx , codersdk .Me )
@@ -500,7 +495,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
500495 t .Run (tc .name , func (t * testing.T ) {
501496 t .Parallel ()
502497 ctx := testutil .Context (t , testutil .WaitLong )
503- res , err := experimentalClient .AIBridgeListInterceptions (ctx , tc .filter )
498+ res , err := client .AIBridgeListInterceptions (ctx , tc .filter )
504499 require .NoError (t , err )
505500 require .EqualValues (t , len (tc .want ), res .Count )
506501 // We just compare UUID strings for the sake of this test.
@@ -530,7 +525,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
530525 },
531526 },
532527 })
533- experimentalClient := codersdk .NewExperimentalClient (client )
534528
535529 // No need to insert any test data, we're just testing the filter
536530 // errors.
@@ -587,7 +581,7 @@ func TestAIBridgeListInterceptions(t *testing.T) {
587581 t .Run (tc .name , func (t * testing.T ) {
588582 t .Parallel ()
589583 ctx := testutil .Context (t , testutil .WaitLong )
590- res , err := experimentalClient .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
584+ res , err := client .AIBridgeListInterceptions (ctx , codersdk.AIBridgeListInterceptionsFilter {
591585 FilterQuery : tc .q ,
592586 })
593587 var sdkErr * codersdk.Error
0 commit comments