Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix Temurin JMOD test paths on Windows
Use platform-aware path construction for the JMOD copy and cache assertions so the Windows test expects backslash-normalized paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
  • Loading branch information
brunoborges and Copilot committed Jul 28, 2026
commit 5573c3d252ed7fbd39b2070b39e3fe5d70672c0c
9 changes: 5 additions & 4 deletions __tests__/distributors/temurin-installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {TemurinImplementation as TemurinImplementationType} from '../../src
import {HttpClient} from '@actions/http-client';
import fs from 'fs';
import os from 'os';
import path from 'path';

import manifestData from '../data/temurin.json' with {type: 'json'};

Expand Down Expand Up @@ -512,14 +513,14 @@ describe('downloadTool', () => {
'https://example.com/jmods.tar.gz'
);
expect(spyCopySync).toHaveBeenCalledWith(
'/tmp/extracted-jmods/jdk-25-jmods',
path.join('/tmp/extracted-jmods', 'jdk-25-jmods'),
process.platform === 'darwin'
? '/tmp/extracted/jdk-25/Contents/Home/jmods'
: '/tmp/extracted/jdk-25/jmods',
? path.join('/tmp/extracted', 'jdk-25', 'Contents', 'Home', 'jmods')
: path.join('/tmp/extracted', 'jdk-25', 'jmods'),
{recursive: true}
);
expect(spyCacheDir).toHaveBeenCalledWith(
'/tmp/extracted/jdk-25',
path.join('/tmp/extracted', 'jdk-25'),
'Java_Temurin-Hotspot_jdk+jmods',
'25.0.3-9',
'x64'
Expand Down
Loading