Enable zstd bundles on GHES and remove feature flag

This commit is contained in:
Henry Mercer
2024-11-01 15:24:47 +00:00
parent 48c3e26756
commit 33f2dc57a4
32 changed files with 82 additions and 154 deletions

View File

@@ -290,23 +290,30 @@ export function mockBundleDownloadApi({
: "osx64";
const baseUrl = apiDetails?.url ?? "https://example.com";
const relativeUrl = apiDetails
? `/${repo}/releases/download/${tagName}/codeql-bundle${
platformSpecific ? `-${platform}` : ""
}.tar.gz`
: `/download/${tagName}/codeql-bundle.tar.gz`;
nock(baseUrl)
.get(relativeUrl)
.replyWithFile(
200,
path.join(
__dirname,
`/../src/testdata/codeql-bundle${isPinned ? "-pinned" : ""}.tar.gz`,
),
);
const bundleUrls = ["tar.gz", "tar.zst"].map((extension) => {
const relativeUrl = apiDetails
? `/${repo}/releases/download/${tagName}/codeql-bundle${
platformSpecific ? `-${platform}` : ""
}.${extension}`
: `/download/${tagName}/codeql-bundle.${extension}`;
return `${baseUrl}${relativeUrl}`;
nock(baseUrl)
.get(relativeUrl)
.replyWithFile(
200,
path.join(
__dirname,
`/../src/testdata/codeql-bundle${
isPinned ? "-pinned" : ""
}.${extension}`,
),
);
return `${baseUrl}${relativeUrl}`;
});
// Choose an arbitrary URL to return
return bundleUrls[0];
}
export function createTestConfig(overrides: Partial<Config>): Config {