mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 00:02:29 +00:00
* refactor(cloud): share PostgreSQL schema startup between services * feat(cloud): add durable native push notification gateway * infra(push): define dedicated gateway resources and operational checks * fix(push): bound cross-host admission and simplify gateway configuration * fix(push): validate deploy configuration and preserve topic-error registrations
18 lines
844 B
TypeScript
18 lines
844 B
TypeScript
import { readFileSync } from 'node:fs'
|
|
import { expect, it } from 'vitest'
|
|
import { loadPushConfig } from './config.js'
|
|
|
|
it('runs the deployment image preflight against the actual config loader', () => {
|
|
const workflow = readFileSync(
|
|
new URL('../../../../.github/workflows/cloud-push-deploy.yml', import.meta.url),
|
|
'utf8'
|
|
)
|
|
const step = workflow.split('- name: Require image support for inert validation')[1]!
|
|
const script = step.match(/--input-type=module -e '([\s\S]*?)'/)?.[1]
|
|
expect(script).toBeDefined()
|
|
const run = new Function('loadPushConfig', script!.replace(/import .*?;/, ''))
|
|
expect(() => run(loadPushConfig)).not.toThrow()
|
|
expect(() => run(() => ({ mode: 'active' }))).toThrow('validation_mode_unsupported')
|
|
expect(() => run(() => ({ mode: 'validation' }))).toThrow('validation_mode_not_fail_closed')
|
|
})
|