Remove the lua tracer feature flag check from the codeql-action.
Always defer to the CLI on the Lua tracer state from now on.
This commit is contained in:
parent
9ba4d500aa
commit
3038e979a8
18 changed files with 43 additions and 415 deletions
|
|
@ -442,102 +442,6 @@ test("databaseInterpretResults() sets --sarif-add-query-help for 2.7.1", async (
|
|||
);
|
||||
});
|
||||
|
||||
test("databaseInitCluster() Lua feature flag enabled, but old CLI", async (t) => {
|
||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon.stub(codeqlObject, "getVersion").resolves("2.9.0");
|
||||
|
||||
await codeqlObject.databaseInitCluster(
|
||||
stubConfig,
|
||||
"",
|
||||
undefined,
|
||||
undefined,
|
||||
createFeatureFlags([FeatureFlag.LuaTracerConfigEnabled]),
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
t.false(
|
||||
runnerConstructorStub.firstCall.args[1].includes(
|
||||
"--internal-use-lua-tracing"
|
||||
),
|
||||
"--internal-use-lua-tracing should be absent, but it is present"
|
||||
);
|
||||
t.false(
|
||||
runnerConstructorStub.firstCall.args[1].includes(
|
||||
"--no-internal-use-lua-tracing"
|
||||
),
|
||||
"--no-internal-use-lua-tracing should be absent, but it is present"
|
||||
);
|
||||
});
|
||||
|
||||
test("databaseInitCluster() Lua feature flag disabled, with old CLI", async (t) => {
|
||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon.stub(codeqlObject, "getVersion").resolves("2.9.0");
|
||||
|
||||
await codeqlObject.databaseInitCluster(
|
||||
stubConfig,
|
||||
"",
|
||||
undefined,
|
||||
undefined,
|
||||
createFeatureFlags([]),
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
t.false(
|
||||
runnerConstructorStub.firstCall.args[1].includes(
|
||||
"--internal-use-lua-tracing"
|
||||
),
|
||||
"--internal-use-lua-tracing should be absent, but it is present"
|
||||
);
|
||||
t.false(
|
||||
runnerConstructorStub.firstCall.args[1].includes(
|
||||
"--no-internal-use-lua-tracing"
|
||||
),
|
||||
"--no-internal-use-lua-tracing should be absent, but it is present"
|
||||
);
|
||||
});
|
||||
|
||||
test("databaseInitCluster() Lua feature flag enabled, compatible CLI", async (t) => {
|
||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon.stub(codeqlObject, "getVersion").resolves("2.10.0");
|
||||
|
||||
await codeqlObject.databaseInitCluster(
|
||||
stubConfig,
|
||||
"",
|
||||
undefined,
|
||||
undefined,
|
||||
createFeatureFlags([FeatureFlag.LuaTracerConfigEnabled]),
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
t.true(
|
||||
runnerConstructorStub.firstCall.args[1].includes(
|
||||
"--internal-use-lua-tracing"
|
||||
),
|
||||
"--internal-use-lua-tracing should be present, but it is absent"
|
||||
);
|
||||
});
|
||||
|
||||
test("databaseInitCluster() Lua feature flag disabled, compatible CLI", async (t) => {
|
||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||
const codeqlObject = await codeql.getCodeQLForTesting();
|
||||
sinon.stub(codeqlObject, "getVersion").resolves("2.10.0");
|
||||
|
||||
await codeqlObject.databaseInitCluster(
|
||||
stubConfig,
|
||||
"",
|
||||
undefined,
|
||||
undefined,
|
||||
createFeatureFlags([]),
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
t.true(
|
||||
runnerConstructorStub.firstCall.args[1].includes(
|
||||
"--no-internal-use-lua-tracing"
|
||||
),
|
||||
"--no-internal-use-lua-tracing should be present, but it is absent"
|
||||
);
|
||||
});
|
||||
|
||||
test("databaseInitCluster() without injected codescanning config", async (t) => {
|
||||
await util.withTmpDir(async (tempDir) => {
|
||||
const runnerConstructorStub = stubToolRunnerConstructor();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue