Files
orca/src/cli/runtime/orchestration-recovery-command.test.ts
T

27 lines
1.1 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import { buildOrchestrationRecoveryCommand } from './orchestration-recovery-command'
describe('orchestration recovery command identity', () => {
it.each([
['split', ['orchestration', 'send', '--pairing-code', 'secret', '--subject', 'status']],
['equals', ['orchestration', 'send', '--pairing-code=secret', '--subject', 'status']],
[
'dispatch split',
['orchestration', 'send', '--dispatch-capability', 'secret', '--subject', 'status']
],
[
'dispatch equals',
['orchestration', 'send', '--dispatch-capability=secret', '--subject', 'status']
]
])('blocks %s credential argv instead of exposing it', (_name, args) => {
expect(
buildOrchestrationRecoveryCommand('orchestration.send', {}, 'orca', args)
).toBeUndefined()
})
it('does not fabricate identity for unsupported mutations or malformed params', () => {
expect(buildOrchestrationRecoveryCommand('orchestration.send', {})).toBeUndefined()
expect(buildOrchestrationRecoveryCommand('orchestration.workerStart', null)).toBeUndefined()
})
})