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

18
lib/testing-utils.js generated
View file

@ -243,13 +243,17 @@ function mockBundleDownloadApi({ apiDetails = exports.SAMPLE_DOTCOM_API_DETAILS,
? "linux64"
: "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`;
(0, nock_1.default)(baseUrl)
.get(relativeUrl)
.replyWithFile(200, path_1.default.join(__dirname, `/../src/testdata/codeql-bundle${isPinned ? "-pinned" : ""}.tar.gz`));
return `${baseUrl}${relativeUrl}`;
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}`;
(0, nock_1.default)(baseUrl)
.get(relativeUrl)
.replyWithFile(200, path_1.default.join(__dirname, `/../src/testdata/codeql-bundle${isPinned ? "-pinned" : ""}.${extension}`));
return `${baseUrl}${relativeUrl}`;
});
// Choose an arbitrary URL to return
return bundleUrls[0];
}
function createTestConfig(overrides) {
return Object.assign({}, {