3f1d816ac0
Story 10.4 — pipeline установки subgraph-расширения:
1. (опц.) OCI token у CA-auth → docker pull образа;
2. (опц.) docker compose up сервиса;
3. healthcheck poll по url subgraph'а до 200 OK;
4. upsert в subgraph_registry (Apollo Gateway за ≤10с подхватит);
5. на failure — composeDown rollback + discriminated outcome {applied|failed}.
InstallController стал тонкой обёрткой над InstallOrchestratorService.
Внешние зависимости (docker shell / fetch / CA-auth) изолированы за
портами; тесты (7/7 green) гоняют сценарий через ин-мемори моки без
реального docker daemon'а и сети.
Что ОСТАЁТСЯ для отдельной ветки под этим зонтиком:
- wiring approve→install REST из mono controller (mutation approvePackage);
- desktop notification после успешного install'а;
- E2E на реальном compose + chatcoop subgraph (Story 10.8).
16 lines
559 B
JavaScript
16 lines
559 B
JavaScript
/**
|
|
* @fileoverview Jest конфиг для orchestrator.
|
|
*
|
|
* Юнит-тесты лежат рядом с код-файлами (`*.spec.ts`). Все внешние
|
|
* зависимости (docker / http / postgres) подменяются ин-мемори
|
|
* фейками — testEnvironment 'node', без shell.
|
|
*/
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'node',
|
|
rootDir: 'src',
|
|
testRegex: '.*\\.spec\\.ts$',
|
|
collectCoverageFrom: ['**/*.ts', '!**/*.spec.ts', '!main.ts'],
|
|
moduleFileExtensions: ['ts', 'js', 'json'],
|
|
};
|