Stop setting CODEQL_RUNNER environment variable if CLI already sets it (#2081)
* Check `setsCodeqlRunnerEnvVar` is set in the CLI with `ToolsFeatures` * Stop setting `CODEQL_RUNNER` env var when CLI does * Add optional `features` parameter in test utils * Test that `CODEQL_RUNNER` is not set if CLI sets it
This commit is contained in:
parent
eb14aeb61d
commit
96531062ba
18 changed files with 152 additions and 37 deletions
|
|
@ -211,14 +211,21 @@ export function mockLanguagesInRepo(languages: string[]) {
|
|||
/**
|
||||
* Constructs a `VersionInfo` object for testing purposes only.
|
||||
*/
|
||||
export const makeVersionInfo = (version: string): CodeQL.VersionInfo => ({
|
||||
export const makeVersionInfo = (
|
||||
version: string,
|
||||
features?: { [name: string]: boolean },
|
||||
): CodeQL.VersionInfo => ({
|
||||
version,
|
||||
features,
|
||||
});
|
||||
|
||||
export function mockCodeQLVersion(version: string) {
|
||||
export function mockCodeQLVersion(
|
||||
version: string,
|
||||
features?: { [name: string]: boolean },
|
||||
) {
|
||||
return {
|
||||
async getVersion() {
|
||||
return makeVersionInfo(version);
|
||||
return makeVersionInfo(version, features);
|
||||
},
|
||||
} as CodeQL.CodeQL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue