Files
canina/backend/src/orchestration/workflow-config.spec.ts
T
devops 3e78b89cc1
Deploy Canina / deploy (push) Successful in 4m40s
fix(orchestration): provision explicit Stage owner Gate1 review access
Preserve independent proposer checks, canonical Admin UUID allowlist and deny ordinary admins. Revalidate pinned owner in read-only CI preflight; expose server-advertised card decisions and distinguish reservation from unknown real cost. Verified backend 42 HTTP/service/config tests and build; admin 18 relevant tests, app tsc and Vite build; 3 CI config tests and bash syntax.
2026-10-24 04:25:35 +00:00

12 lines
859 B
TypeScript

import { workflowConfig } from './workflow-config';
describe('startup owner reviewer configuration',()=>{
it('defaults denied, accepts explicit UUID only in staging',()=>{
expect(workflowConfig({}).ownerReviewerIds).toEqual([]);
expect(workflowConfig({NODE_ENV:'production',CANINA_WORKFLOW_OWNER_REVIEWER_IDS:'12345678-1234-1234-1234-123456789012'})).toMatchObject({ownerReviewerIds:[]});
expect(workflowConfig({CANINA_ENV:'staging',CANINA_WORKFLOW_OWNER_REVIEWER_IDS:'12345678-1234-1234-1234-123456789012'}).ownerReviewerIds).toEqual(['12345678-1234-1234-1234-123456789012']);
});
it.each(['*','admin','12345678-1234-1234-1234-123456789012,'])('fails startup on malformed explicit grant %s',ids=>{
expect(()=>workflowConfig({CANINA_ENV:'staging',CANINA_WORKFLOW_OWNER_REVIEWER_IDS:ids})).toThrow('Invalid owner reviewer UUID allowlist');
});
});