diff --git a/scripts/release/smoke-package.mjs b/scripts/release/smoke-package.mjs index ef4d4cc..a137da9 100644 --- a/scripts/release/smoke-package.mjs +++ b/scripts/release/smoke-package.mjs @@ -1,6 +1,6 @@ import { spawn } from 'node:child_process' import { createHash } from 'node:crypto' -import { mkdir, mkdtemp, readdir, readFile, rm, stat, writeFile } from 'node:fs/promises' +import { mkdir, mkdtemp, readdir, readFile, realpath, rm, stat, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import { basename, dirname, join, relative, resolve } from 'node:path' import { fileURLToPath } from 'node:url' @@ -140,7 +140,7 @@ const expectedArchitecture = assert(artifactRootValue, '--artifact-root is required') const artifactRoot = resolve(artifactRootValue) const proof = JSON.parse(await readFile(join(artifactRoot, 'w6', 'package-proof.json'), 'utf8')) -const smokeRoot = await mkdtemp(join(tmpdir(), 'braid-platform-smoke-')) +const smokeRoot = await realpath(await mkdtemp(join(tmpdir(), 'braid-platform-smoke-'))) let smokeResult try { diff --git a/test/scripts.test.ts b/test/scripts.test.ts index 61f186c..515c03c 100644 --- a/test/scripts.test.ts +++ b/test/scripts.test.ts @@ -686,10 +686,16 @@ test('release keys stay isolated while publication uses the installed product', const candidateSmoke = job('platform-smoke', 'publish') const registrySmoke = job('post-publish-smoke', 'finalize') + const packageSmoke = await readFile('scripts/release/smoke-package.mjs', 'utf8') assert.match(candidateSmoke, /name: Install and use the exact candidate/u) assert.match(candidateSmoke, /node scripts\/release\/smoke-package\.mjs/u) assert.match(registrySmoke, /name: Download and use the registry package/u) assert.match(registrySmoke, /node scripts\/release\/smoke-package\.mjs/u) + assert.match( + packageSmoke, + /const smokeRoot = await realpath\(await mkdtemp\(/u, + 'Package smoke must use a physical path for protected storage on macOS', + ) const finalize = job('finalize', 'endorse-final') assert.match(finalize, /name: Validate candidate and registry use/u)