Files
orca/cloud/apps/push/src/push-deploy-preflight.test.ts
Jinwoo Hong eb2f2d52ae feat(cloud): native push gateway and dedicated infrastructure (1/3) (#19912)
* 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
2026-09-10 17:59:46 -04:00

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')
})