forked from wangziqi/gongxue-base
feat: harden production storage readiness
This commit is contained in:
@@ -722,6 +722,7 @@ async function testProductionConfigFailFast() {
|
||||
AUTH_CODE_PEPPER: 'development-code-pepper-change-me',
|
||||
AUTH_SESSION_SECRET: 'development-session-secret-change-me',
|
||||
PLATFORM_ADMIN_API_KEY: 'local-platform-admin-key',
|
||||
STORAGE_DEFAULT_PROVIDER: 'local_dev',
|
||||
},
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
windowsHide: true,
|
||||
@@ -738,6 +739,7 @@ async function testProductionConfigFailFast() {
|
||||
const result = await waitForProcessExit(child);
|
||||
assert.notEqual(result.code, 0, 'production server with unsafe defaults should fail to start');
|
||||
assert.match(logs, /Invalid production API configuration/, 'production fail-fast should explain unsafe config');
|
||||
assert.match(logs, /STORAGE_DEFAULT_PROVIDER=local_dev/, 'production fail-fast should reject local_dev storage');
|
||||
}
|
||||
|
||||
async function loginBySms(phone = '13800000000') {
|
||||
|
||||
Reference in New Issue
Block a user