Remove feature flag for analysis summary v2

This commit is contained in:
Henry Mercer 2023-10-25 17:24:22 +01:00
parent edb8265ab8
commit 2cbabeaa72
12 changed files with 91 additions and 49 deletions

View file

@ -1005,29 +1005,45 @@ test("databaseInterpretResults() does not set --sarif-add-baseline-file-info for
const NEW_ANALYSIS_SUMMARY_TEST_CASES = [
{
featureEnabled: true,
codeqlVersion: "2.15.0",
githubVersion: {
type: util.GitHubVariant.DOTCOM,
},
flagPassed: true,
negativeFlagPassed: false,
},
{
featureEnabled: false,
codeqlVersion: "2.15.0",
githubVersion: {
type: util.GitHubVariant.GHES,
version: "3.9.0",
},
flagPassed: true,
negativeFlagPassed: false,
},
{
codeqlVersion: "2.15.0",
githubVersion: {
type: util.GitHubVariant.GHES,
version: "3.8.6",
},
flagPassed: false,
negativeFlagPassed: true,
},
{
featureEnabled: false,
codeqlVersion: "2.14.6",
githubVersion: {
type: util.GitHubVariant.DOTCOM,
},
flagPassed: false,
negativeFlagPassed: false,
},
];
for (const {
featureEnabled,
codeqlVersion,
flagPassed,
githubVersion,
negativeFlagPassed,
} of NEW_ANALYSIS_SUMMARY_TEST_CASES) {
test(`database interpret-results passes ${
@ -1036,9 +1052,9 @@ for (const {
: negativeFlagPassed
? "--no-new-analysis-summary"
: "nothing"
} for CodeQL CLI v${codeqlVersion} when the new analysis summary feature is ${
featureEnabled ? "enabled" : "disabled"
}`, async (t) => {
} for CodeQL CLI v${codeqlVersion} and ${
util.GitHubVariant[githubVersion.type]
} ${githubVersion.version ? ` ${githubVersion.version}` : ""}`, async (t) => {
const runnerConstructorStub = stubToolRunnerConstructor();
const codeqlObject = await codeql.getCodeQLForTesting();
sinon
@ -1054,8 +1070,8 @@ for (const {
"",
"-v",
"",
stubConfig,
createFeatures(featureEnabled ? [Feature.AnalysisSummaryV2Enabled] : []),
Object.assign({}, stubConfig, { gitHubVersion: githubVersion }),
createFeatures([]),
getRunnerLogger(true),
);
t.is(