@@ -314,28 +314,6 @@ import { DBWorkspaceInstance } from './typeorm/entity/db-workspace-instance';
314
314
expect ( dbResult . total ) . to . eq ( 1 ) ;
315
315
}
316
316
317
- @test ( timeout ( 10000 ) )
318
- public async testFindAllWorkspaceAndInstances_contextUrl ( ) {
319
- await Promise . all ( [
320
- this . db . store ( this . ws ) ,
321
- this . db . storeInstance ( this . wsi1 ) ,
322
- this . db . storeInstance ( this . wsi2 ) ,
323
- this . db . store ( this . ws2 ) ,
324
- this . db . storeInstance ( this . ws2i1 ) ,
325
- ] ) ;
326
- const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "contextURL" , "DESC" , undefined , this . ws . contextURL ) ;
327
- // It should only find one workspace instance
328
- expect ( dbResult . total ) . to . eq ( 1 ) ;
329
-
330
- const workspaceAndInstance = dbResult . rows [ 0 ]
331
-
332
- // It should find the workspace that uses the queried context url
333
- expect ( workspaceAndInstance . workspaceId ) . to . eq ( this . ws . id )
334
-
335
- // It should select the workspace instance that was most recently created
336
- expect ( workspaceAndInstance . instanceId ) . to . eq ( this . wsi2 . id )
337
- }
338
-
339
317
@test ( timeout ( 10000 ) )
340
318
public async testFindAllWorkspaceAndInstances_workspaceId ( ) {
341
319
await Promise . all ( [
@@ -344,7 +322,7 @@ import { DBWorkspaceInstance } from './typeorm/entity/db-workspace-instance';
344
322
this . db . store ( this . ws2 ) ,
345
323
this . db . storeInstance ( this . ws2i1 ) ,
346
324
] ) ;
347
- const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "workspaceId" , "DESC" , { workspaceId : this . ws2 . id } , undefined ) ;
325
+ const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "workspaceId" , "DESC" , { workspaceId : this . ws2 . id } ) ;
348
326
// It should only find one workspace instance
349
327
expect ( dbResult . total ) . to . eq ( 1 ) ;
350
328
@@ -361,7 +339,7 @@ import { DBWorkspaceInstance } from './typeorm/entity/db-workspace-instance';
361
339
this . db . store ( this . ws2 ) ,
362
340
this . db . storeInstance ( this . ws2i1 ) ,
363
341
] ) ;
364
- const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "workspaceId" , "DESC" , { instanceIdOrWorkspaceId : this . ws2 . id } , undefined ) ;
342
+ const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "workspaceId" , "DESC" , { instanceIdOrWorkspaceId : this . ws2 . id } ) ;
365
343
// It should only find one workspace instance
366
344
expect ( dbResult . total ) . to . eq ( 1 ) ;
367
345
@@ -379,7 +357,7 @@ import { DBWorkspaceInstance } from './typeorm/entity/db-workspace-instance';
379
357
this . db . store ( this . ws2 ) ,
380
358
this . db . storeInstance ( this . ws2i1 ) ,
381
359
] ) ;
382
- const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "instanceId" , "DESC" , { instanceId : this . wsi1 . id } , undefined ) ;
360
+ const dbResult = await this . db . findAllWorkspaceAndInstances ( 0 , 10 , "instanceId" , "DESC" , { instanceId : this . wsi1 . id } ) ;
383
361
384
362
// It should only find one workspace instance
385
363
expect ( dbResult . total ) . to . eq ( 1 ) ;
0 commit comments