Download codeql/java-all in tests

An upcoming change in the CLI will require that the extensible
predicates that are targeted by a data extension needs to be available
in order for the `resolve extensions` command to succeed.

There are a handful of tests that are failing with this new CLI. This
change will update the tests so that the `codeql/java-all` pack is
available in the tests and ensures they pass.
This commit is contained in:
Andrew Eisenberg
2023-07-28 14:49:55 -07:00
parent bb9299e0e2
commit 0cc399507f

View File

@@ -52,6 +52,14 @@ describe("modeled-method-fs", () => {
let workspacePath: string;
let cli: CodeQLCliServer;
beforeAll(async () => {
const extension = await getActivatedExtension();
cli = extension.cliServer;
// The java-all pack needs to be available for codeql resolve extensions to succeed.
await cli.packDownload(["codeql/java-all"]);
});
beforeEach(async () => {
// On windows, make sure to use a temp directory that isn't an alias and therefore won't be canonicalised by CodeQL.
// See https://github.com/github/vscode-codeql/pull/2605 for more context.