Fix MRVA integration test failure
This commit is contained in:
@@ -1737,6 +1737,9 @@ export class CliVersionConstraint {
|
|||||||
*/
|
*/
|
||||||
public static CLI_VERSION_WITH_TRIM_CACHE = new SemVer("2.15.1");
|
public static CLI_VERSION_WITH_TRIM_CACHE = new SemVer("2.15.1");
|
||||||
|
|
||||||
|
public static CLI_VERSION_WITH_EXTENSIBLE_PREDICATE_METADATA_IN_QLX =
|
||||||
|
new SemVer("2.16.1");
|
||||||
|
|
||||||
constructor(private readonly cli: CodeQLCliServer) {
|
constructor(private readonly cli: CodeQLCliServer) {
|
||||||
/**/
|
/**/
|
||||||
}
|
}
|
||||||
@@ -1779,6 +1782,11 @@ export class CliVersionConstraint {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async supportsExtensiblePredicateMetadataInQlx() {
|
||||||
|
return this.isVersionAtLeast(
|
||||||
|
CliVersionConstraint.CLI_VERSION_WITH_EXTENSIBLE_PREDICATE_METADATA_IN_QLX,
|
||||||
|
);
|
||||||
|
}
|
||||||
async supportsMrvaPackCreate(): Promise<boolean> {
|
async supportsMrvaPackCreate(): Promise<boolean> {
|
||||||
return (await this.cli.getFeatures()).mrvaPackCreate === true;
|
return (await this.cli.getFeatures()).mrvaPackCreate === true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -275,7 +275,15 @@ describe("Variant Analysis Manager", () => {
|
|||||||
|
|
||||||
const queryToRun =
|
const queryToRun =
|
||||||
"Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql";
|
"Security/CWE/CWE-020/ExternalAPIsUsedWithUntrustedData.ql";
|
||||||
const extraQuery = "Telemetry/ExtractorInformation.ql";
|
|
||||||
|
// We only need to preserve queries with extensible predicates if the CLI doesn't support
|
||||||
|
// storing the necessary metadata in the compiled QLX.
|
||||||
|
const needsExtraQueries =
|
||||||
|
!cli.cliConstraints.supportsExtensiblePredicateMetadataInQlx();
|
||||||
|
|
||||||
|
const extraQueries = needsExtraQueries
|
||||||
|
? ["Telemetry/ExtractorInformation.ql"]
|
||||||
|
: [];
|
||||||
|
|
||||||
await doVariantAnalysisTest({
|
await doVariantAnalysisTest({
|
||||||
queryPath: join(
|
queryPath: join(
|
||||||
@@ -284,7 +292,7 @@ describe("Variant Analysis Manager", () => {
|
|||||||
queryToRun,
|
queryToRun,
|
||||||
),
|
),
|
||||||
expectedPackName: "codeql/java-queries",
|
expectedPackName: "codeql/java-queries",
|
||||||
filesThatExist: [queryToRun, extraQuery],
|
filesThatExist: [queryToRun, ...extraQueries],
|
||||||
filesThatDoNotExist: [],
|
filesThatDoNotExist: [],
|
||||||
qlxFilesThatExist: [],
|
qlxFilesThatExist: [],
|
||||||
dependenciesToCheck: ["codeql/java-all"],
|
dependenciesToCheck: ["codeql/java-all"],
|
||||||
|
|||||||
Reference in New Issue
Block a user