Clean up pre GHES 3.14 code paths

This commit is contained in:
Henry Mercer
2026-03-09 16:35:21 +00:00
parent b39251fe78
commit ab180c9eeb
7 changed files with 28 additions and 135 deletions
+19 -87
View File
@@ -631,57 +631,10 @@ test.serial(
"shouldShowCombineSarifFilesDeprecationWarning when on dotcom",
async (t) => {
t.true(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
{
type: GitHubVariant.DOTCOM,
},
),
);
},
);
test.serial(
"shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.13",
async (t) => {
t.false(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
{
type: GitHubVariant.GHES,
version: "3.13.2",
},
),
);
},
);
test.serial(
"shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.14",
async (t) => {
t.true(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
{
type: GitHubVariant.GHES,
version: "3.14.0",
},
),
);
},
);
test.serial(
"shouldShowCombineSarifFilesDeprecationWarning when on GHES 3.16 pre",
async (t) => {
t.true(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
{
type: GitHubVariant.GHES,
version: "3.16.0.pre1",
},
),
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([
createMockSarif("abc", "def"),
createMockSarif("abc", "def"),
]),
);
},
);
@@ -690,12 +643,9 @@ test.serial(
"shouldShowCombineSarifFilesDeprecationWarning with only 1 run",
async (t) => {
t.false(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def")],
{
type: GitHubVariant.DOTCOM,
},
),
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([
createMockSarif("abc", "def"),
]),
);
},
);
@@ -704,12 +654,10 @@ test.serial(
"shouldShowCombineSarifFilesDeprecationWarning with distinct categories",
async (t) => {
t.false(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def"), createMockSarif("def", "def")],
{
type: GitHubVariant.DOTCOM,
},
),
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([
createMockSarif("abc", "def"),
createMockSarif("def", "def"),
]),
);
},
);
@@ -718,12 +666,10 @@ test.serial(
"shouldShowCombineSarifFilesDeprecationWarning with distinct tools",
async (t) => {
t.false(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "abc"), createMockSarif("abc", "def")],
{
type: GitHubVariant.DOTCOM,
},
),
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([
createMockSarif("abc", "abc"),
createMockSarif("abc", "def"),
]),
);
},
);
@@ -734,12 +680,10 @@ test.serial(
process.env["CODEQL_MERGE_SARIF_DEPRECATION_WARNING"] = "true";
t.false(
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning(
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
{
type: GitHubVariant.DOTCOM,
},
),
await uploadLib.shouldShowCombineSarifFilesDeprecationWarning([
createMockSarif("abc", "def"),
createMockSarif("abc", "def"),
]),
);
},
);
@@ -759,18 +703,6 @@ test.serial("throwIfCombineSarifFilesDisabled when on dotcom", async (t) => {
);
});
test.serial("throwIfCombineSarifFilesDisabled when on GHES 3.13", async (t) => {
await t.notThrowsAsync(
uploadLib.throwIfCombineSarifFilesDisabled(
[createMockSarif("abc", "def"), createMockSarif("abc", "def")],
{
type: GitHubVariant.GHES,
version: "3.13.2",
},
),
);
});
test.serial("throwIfCombineSarifFilesDisabled when on GHES 3.14", async (t) => {
await t.notThrowsAsync(
uploadLib.throwIfCombineSarifFilesDisabled(