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_EXTENSIBLE_PREDICATE_METADATA_IN_QLX =
|
||||
new SemVer("2.16.1");
|
||||
|
||||
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> {
|
||||
return (await this.cli.getFeatures()).mrvaPackCreate === true;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,15 @@ describe("Variant Analysis Manager", () => {
|
||||
|
||||
const queryToRun =
|
||||
"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({
|
||||
queryPath: join(
|
||||
@@ -284,7 +292,7 @@ describe("Variant Analysis Manager", () => {
|
||||
queryToRun,
|
||||
),
|
||||
expectedPackName: "codeql/java-queries",
|
||||
filesThatExist: [queryToRun, extraQuery],
|
||||
filesThatExist: [queryToRun, ...extraQueries],
|
||||
filesThatDoNotExist: [],
|
||||
qlxFilesThatExist: [],
|
||||
dependenciesToCheck: ["codeql/java-all"],
|
||||
|
||||
Reference in New Issue
Block a user