fix(ci): use environment variable for emergency token in tests

This commit is contained in:
GitHub Actions
2026-01-26 20:36:01 +00:00
parent ac803fd411
commit 4a0f038eca
2 changed files with 2 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ import { test, expect } from '@playwright/test';
test.describe('Break Glass - Tier 2 (Emergency Server)', () => {
const EMERGENCY_BASE_URL = 'http://localhost:2020';
const EMERGENCY_TOKEN = 'test-emergency-token-for-e2e-32chars';
const EMERGENCY_TOKEN = process.env.CHARON_EMERGENCY_TOKEN || 'test-emergency-token-for-e2e-32chars';
const BASIC_AUTH = 'Basic ' + Buffer.from('admin:testpass').toString('base64');
test('should access emergency server health endpoint without ACL blocking', async ({ request }) => {

View File

@@ -126,7 +126,7 @@ async function globalSetup(): Promise<void> {
async function emergencySecurityReset(requestContext: APIRequestContext): Promise<void> {
console.log('🔓 Performing emergency security reset...');
const emergencyToken = 'test-emergency-token-for-e2e-32chars';
const emergencyToken = process.env.CHARON_EMERGENCY_TOKEN || 'test-emergency-token-for-e2e-32chars';
try {
// Use the CORRECT endpoint: /api/v1/emergency/security-reset