mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 19:07:41 +00:00
27 lines
1.1 KiB
TypeScript
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()
|
|
})
|
|
})
|