mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-25 08:48:08 +02:00
test: finalize managed runtime release smoke
This commit is contained in:
parent
ed00c9a0a3
commit
b493f43412
4 changed files with 26 additions and 3 deletions
|
|
@ -70,6 +70,19 @@ describe('managedPythonRuntimeLayout', () => {
|
|||
expect(layout.assetManifestPath).toBe('/repo/packages/cli/assets/python/manifest.json');
|
||||
});
|
||||
|
||||
it('honors KTX_RUNTIME_ROOT before platform defaults', () => {
|
||||
const layout = managedPythonRuntimeLayout({
|
||||
cliVersion: '0.2.0',
|
||||
platform: 'darwin',
|
||||
env: { KTX_RUNTIME_ROOT: '/tmp/ktx-runtime' },
|
||||
homeDir: '/Users/alex',
|
||||
assetDir: '/repo/packages/cli/assets/python',
|
||||
});
|
||||
|
||||
expect(layout.runtimeRoot).toBe('/tmp/ktx-runtime');
|
||||
expect(layout.versionDir).toBe('/tmp/ktx-runtime/0.2.0');
|
||||
});
|
||||
|
||||
it('honors XDG_DATA_HOME on Linux', () => {
|
||||
const layout = managedPythonRuntimeLayout({
|
||||
cliVersion: '0.2.0',
|
||||
|
|
|
|||
|
|
@ -119,6 +119,9 @@ function defaultAssetDir(): string {
|
|||
}
|
||||
|
||||
function runtimeRootFor(input: Required<Pick<ManagedPythonRuntimeLayoutOptions, 'platform' | 'env' | 'homeDir'>>): string {
|
||||
if (input.env.KTX_RUNTIME_ROOT) {
|
||||
return input.env.KTX_RUNTIME_ROOT;
|
||||
}
|
||||
if (input.platform === 'darwin') {
|
||||
return join(input.homeDir, 'Library', 'Application Support', 'kaelio', 'ktx', 'runtime');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue