fix: explicit JWT_SECRET in process env + correct 404 test
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 50s
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 50s
This commit is contained in:
parent
6a044fe29b
commit
d57d9e009e
@ -101,7 +101,9 @@ function envForProcess(baseEnv: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
|
||||
DEEPSEEK_API_KEY: 'sk-test',
|
||||
STORAGE_DRIVER: 'local',
|
||||
ENABLE_SWAGGER: 'false',
|
||||
// No Bull Board in test
|
||||
JWT_SECRET: baseEnv.JWT_SECRET || 'test-integration-secret',
|
||||
JWT_ACCESS_EXPIRES_IN: '1h',
|
||||
CREDENTIAL_ENCRYPTION_KEY: baseEnv.CREDENTIAL_ENCRYPTION_KEY || '0123456789abcdef0123456789abcdef',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -232,11 +232,12 @@ describe('API E2E: Active Recall', () => {
|
||||
expect(res.status).toBe(401);
|
||||
});
|
||||
|
||||
it('404 不存在的 Question', async () => {
|
||||
it('不存在的 Question 返回 404', async () => {
|
||||
const res = await httpPost('/api/active-recalls/nonexistent-id/submit', {
|
||||
answerText: 'A',
|
||||
}, userToken);
|
||||
expect([403, 404]).toContain(res.status);
|
||||
// Service throws NotFoundException → 404
|
||||
expect(res.status).toBe(404);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user