mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 08:02:32 +00:00
Test managed CLI launchers with the Bun runtime contract
This commit is contained in:
@@ -978,6 +978,11 @@ jobs:
|
||||
pnpm exec vitest run --config config/vitest.config.ts
|
||||
config/scripts/nsis-process-check.test.mjs
|
||||
|
||||
- name: Prepare pinned Bun for CLI boundary tests
|
||||
run: |
|
||||
node config/scripts/build-orcad-bun.mjs --runtime-only --out-dir out/windows-cli-test-runtime
|
||||
"BUN_EXECUTABLE=$((Resolve-Path out/windows-cli-test-runtime/bun-runtime.exe).Path)" >> $env:GITHUB_ENV
|
||||
|
||||
# vitest runs here directly rather than through `pnpm test`, so the addon
|
||||
# assertions only hold once install-node-dependencies has rebuilt natives.
|
||||
- name: Test Windows-specific boundaries
|
||||
|
||||
@@ -196,6 +196,10 @@ describe('WSL CLI PowerShell boundary', () => {
|
||||
it.skipIf(process.platform !== 'win32')(
|
||||
'pins a non-ASCII app identity and the dev launcher env through Windows PowerShell 5.1',
|
||||
async () => {
|
||||
const runtime = process.env.BUN_EXECUTABLE
|
||||
if (!runtime) {
|
||||
throw new Error('BUN_EXECUTABLE is required for the managed Bun bridge test')
|
||||
}
|
||||
const root = await mkdtemp(join(tmpdir(), 'orca-wsl-managed-bridge-'))
|
||||
const userDataPath = join(root, "张三's O\u2019Brien Orca")
|
||||
const cliEntryPath = join(root, 'cli \u2018entry\u2019.cjs')
|
||||
@@ -220,7 +224,7 @@ describe('WSL CLI PowerShell boundary', () => {
|
||||
'Bypass',
|
||||
'-File',
|
||||
bridgePath,
|
||||
process.execPath,
|
||||
runtime,
|
||||
'-WslCwd',
|
||||
root,
|
||||
...FORWARDED_ARGS
|
||||
|
||||
@@ -628,7 +628,7 @@ describe('runRemoteOrcaCli', () => {
|
||||
env: { ORCA_TERMINAL_HANDLE: 'term_ssh' }
|
||||
},
|
||||
{
|
||||
execPath: '/host/electron',
|
||||
execPath: '/host/bun-runtime',
|
||||
cliEntryPath: '/host/app/out/cli/index.js',
|
||||
userDataPath: '/host/user-data',
|
||||
entryExists: () => true,
|
||||
@@ -644,6 +644,9 @@ describe('runRemoteOrcaCli', () => {
|
||||
expect(result).toEqual({ stdout: '{"ok":true}\n', stderr: '', exitCode: 0 })
|
||||
const [, args] = spawn.mock.calls[0] as unknown as [string, string[]]
|
||||
expect(args).toEqual([
|
||||
'--no-env-file',
|
||||
process.platform === 'win32' ? '--config=NUL' : '--config=/dev/null',
|
||||
'--no-install',
|
||||
'/host/app/out/cli/index.js',
|
||||
'worktree',
|
||||
'create',
|
||||
|
||||
Reference in New Issue
Block a user