fix(gateway): 프로필 런타임 DB URL을 고정한다
game API와 daemon, worker PM2 정의에 인코딩된 profile DATABASE_URL을 명시한다. migration 성공 뒤 runtime과 rollback이 raw POSTGRES 비밀번호로 실패하는 경로를 회귀 테스트한다.
This commit is contained in:
@@ -144,9 +144,11 @@ describe('profile DEPLOY operation', () => {
|
||||
];
|
||||
const backendProcessNames = processNames.filter((name) => !name.endsWith(':game-frontend'));
|
||||
const running = new Set(processNames);
|
||||
const startedDefinitions: Array<Parameters<ProcessManager['start']>[0]> = [];
|
||||
const processManager: ProcessManager = {
|
||||
list: async () => [...running].map((name) => ({ name, status: 'online' })),
|
||||
start: async (definition) => {
|
||||
startedDefinitions.push(definition);
|
||||
running.add(definition.name);
|
||||
},
|
||||
stop: async () => {},
|
||||
@@ -225,6 +227,12 @@ describe('profile DEPLOY operation', () => {
|
||||
expect(commandGroups[1]?.[0]?.env?.DATABASE_URL).toBe(
|
||||
'postgresql://user:encoded%23password@integration.invalid/sammo?schema=che'
|
||||
);
|
||||
expect(startedDefinitions).toHaveLength(backendProcessNames.length);
|
||||
for (const definition of startedDefinitions) {
|
||||
expect(definition.env?.DATABASE_URL).toBe(
|
||||
'postgresql://user:encoded%23password@integration.invalid/sammo?schema=che'
|
||||
);
|
||||
}
|
||||
expect(commandGroups.flat().some((command) => command.env?.GATEWAY_ROLE === 'profile-seed')).toBe(false);
|
||||
expect(patches.at(-1)).toMatchObject({
|
||||
buildStatus: 'SUCCEEDED',
|
||||
|
||||
Reference in New Issue
Block a user