Skip to content

Commit 351db4e

Browse files
committed
Fix cli-integration tests
The main problem this commit fixes is with vscode 1.67.0, an error is thrown when inside of integration tests and a dialog box is opened. We were opening the telemetry dialog box. Now, an env variable is set during cli-integration tests that prevents the dialog from being opened. There are also other cleanups and improvements with cli-integration tests that assist with running locally: - `vscode-test` dependency has been renamed to `@vscode/test-electron`, so use that instead and make the small API changes to support it. - Commit the codeql-pack.lock.yml file so it isn't recreated on each test run. - Ensure all databases are removed before _and after_ each test run that manipulates the set of installed databases - Similarly, for quick query files, delete them before and after each test. - Change some async `forEach` blocks to for loops in order to support sequential operations more easily.
1 parent e1adc7b commit 351db4e

25 files changed

Lines changed: 783 additions & 262 deletions

.vscode/launch.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// Add a reference to a workspace to open. Eg-
1313
// "${workspaceRoot}/../vscode-codeql-starter/vscode-codeql-starter.code-workspace"
1414
],
15-
"stopOnEntry": false,
1615
"sourceMaps": true,
1716
"outFiles": [
1817
"${workspaceRoot}/extensions/ql-vscode/out/**/*.js",
@@ -46,7 +45,6 @@
4645
"ts-node/register",
4746
"test/pure-tests/**/*.ts"
4847
],
49-
"port": 9229,
5048
"stopOnEntry": false,
5149
"sourceMaps": true,
5250
"console": "integratedTerminal",
@@ -60,10 +58,10 @@
6058
"args": [
6159
"--extensionDevelopmentPath=${workspaceRoot}/extensions/ql-vscode",
6260
"--extensionTestsPath=${workspaceRoot}/extensions/ql-vscode/out/vscode-tests/no-workspace/index",
61+
"--disable-workspace-trust",
6362
"--disable-extensions",
6463
"--disable-gpu"
6564
],
66-
"stopOnEntry": false,
6765
"sourceMaps": true,
6866
"outFiles": [
6967
"${workspaceRoot}/extensions/ql-vscode/out/**/*.js",
@@ -77,11 +75,11 @@
7775
"args": [
7876
"--extensionDevelopmentPath=${workspaceRoot}/extensions/ql-vscode",
7977
"--extensionTestsPath=${workspaceRoot}/extensions/ql-vscode/out/vscode-tests/minimal-workspace/index",
78+
"--disable-workspace-trust",
8079
"--disable-extensions",
8180
"--disable-gpu",
8281
"${workspaceRoot}/extensions/ql-vscode/test/data"
8382
],
84-
"stopOnEntry": false,
8583
"sourceMaps": true,
8684
"outFiles": [
8785
"${workspaceRoot}/extensions/ql-vscode/out/**/*.js",
@@ -95,6 +93,7 @@
9593
"args": [
9694
"--extensionDevelopmentPath=${workspaceRoot}/extensions/ql-vscode",
9795
"--extensionTestsPath=${workspaceRoot}/extensions/ql-vscode/out/vscode-tests/cli-integration/index",
96+
"--disable-workspace-trust",
9897
"--disable-gpu",
9998
"--disable-extension",
10099
"eamodio.gitlens",
@@ -121,7 +120,6 @@
121120
// This option overrides the CLI_VERSION option.
122121
// "CLI_PATH": "${workspaceRoot}/../semmle-code/target/intree/codeql/codeql",
123122
},
124-
"stopOnEntry": false,
125123
"sourceMaps": true,
126124
"outFiles": [
127125
"${workspaceRoot}/extensions/ql-vscode/out/**/*.js",

0 commit comments

Comments
 (0)