test(federation): require all Step-CA env vars for stepCaRun gate
Guard against partial env var sets where STEP_CA_AVAILABLE=1 is set but provisioner key or root cert path are missing, which would cause CaService constructor to throw during NestJS module instantiation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -54,7 +54,12 @@ import { GrantsService } from '../../federation/grants.service.js';
|
|||||||
import { EnrollmentService } from '../../federation/enrollment.service.js';
|
import { EnrollmentService } from '../../federation/enrollment.service.js';
|
||||||
|
|
||||||
const run = process.env['FEDERATED_INTEGRATION'] === '1';
|
const run = process.env['FEDERATED_INTEGRATION'] === '1';
|
||||||
const stepCaRun = run && process.env['STEP_CA_AVAILABLE'] === '1';
|
const stepCaRun =
|
||||||
|
run &&
|
||||||
|
process.env['STEP_CA_AVAILABLE'] === '1' &&
|
||||||
|
!!process.env['STEP_CA_URL'] &&
|
||||||
|
!!process.env['STEP_CA_PROVISIONER_KEY_JSON'] &&
|
||||||
|
!!process.env['STEP_CA_ROOT_CERT_PATH'];
|
||||||
|
|
||||||
const PG_URL = 'postgresql://mosaic:mosaic@localhost:5433/mosaic';
|
const PG_URL = 'postgresql://mosaic:mosaic@localhost:5433/mosaic';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user