Upgrade to node 24 (#888)

* Upgrade to node 24

Upgrading action to node 24 since new runner version.

* fix tests

* Fix tests and licences

* format

* format x2

* Upgrade Node.js version in workflow files to 24.x

* check failure fix

* check failures fix

* Fix mock platform

---------

Co-authored-by: Aparna Jyothi <aparnajyothi-y@github.com>
Co-authored-by: Haritha <73516759+HarithaVattikuti@users.noreply.github.com>
This commit is contained in:
Salman Chishti 2025-08-20 20:07:47 +01:00 committed by GitHub
commit 0913e9a06e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 98 additions and 60 deletions

View file

@ -203,28 +203,27 @@ describe('getAvailableVersions', () => {
});
it.each([
['arm64', 'aarch64'],
['amd64', 'x64']
['amd64', 'x64'],
['arm64', 'aarch64']
])(
'defaults to os.arch(): %s mapped to distro arch: %s',
async (osArch: string, distroArch: string) => {
jest.spyOn(os, 'arch').mockReturnValue(osArch);
jest
.spyOn(os, 'arch')
.mockReturnValue(osArch as ReturnType<typeof os.arch>);
const version = '17';
const installerOptions: JavaInstallerOptions = {
version,
const distribution = new CorrettoDistribution({
version: '17',
architecture: '', // to get default value
packageType: 'jdk',
checkLatest: false
};
const distribution = new CorrettoDistribution(installerOptions);
});
mockPlatform(distribution, 'macos');
const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`;
const availableVersion = await distribution['findPackageForDownload'](
version
'17'
);
expect(availableVersion).not.toBeNull();
expect(availableVersion.url).toBe(expectedLink);