File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -1001,6 +1001,15 @@ export class DatabaseManager extends DisposableObject {
10011001 } ) ;
10021002 }
10031003
1004+ public async removeAllDatabases (
1005+ progress : ProgressCallback ,
1006+ token : vscode . CancellationToken ,
1007+ ) {
1008+ for ( const item of this . databaseItems ) {
1009+ await this . removeDatabaseItem ( progress , token , item ) ;
1010+ }
1011+ }
1012+
10041013 private async deregisterDatabase (
10051014 progress : ProgressCallback ,
10061015 token : vscode . CancellationToken ,
Original file line number Diff line number Diff line change 11import { join } from "path" ;
22import { load , dump } from "js-yaml" ;
33import { realpathSync , readFileSync , writeFileSync } from "fs-extra" ;
4- import { commands , extensions } from "vscode" ;
4+ import { CancellationToken , extensions } from "vscode" ;
55import { DatabaseManager } from "../../src/local-databases" ;
66import { CodeQLCliServer } from "../../src/cli" ;
77import { removeWorkspaceRefs } from "../../src/variant-analysis/run-remote-query" ;
88import { CodeQLExtensionInterface } from "../../src/extension" ;
9+ import { ProgressCallback } from "../../src/progress" ;
910
1011// This file contains helpers shared between tests that work with an activated extension.
1112
@@ -37,9 +38,10 @@ export async function getActivatedExtension(): Promise<CodeQLExtensionInterface>
3738}
3839
3940export async function cleanDatabases ( databaseManager : DatabaseManager ) {
40- for ( const item of databaseManager . databaseItems ) {
41- await commands . executeCommand ( "codeQLDatabases.removeDatabase" , item ) ;
42- }
41+ await databaseManager . removeAllDatabases (
42+ { } as ProgressCallback ,
43+ { } as CancellationToken ,
44+ ) ;
4345}
4446
4547/**
You can’t perform that action at this time.
0 commit comments