fix: Gateway 기수 표시명을 명예의 전당과 왕조에 전달한다
RESET에서 Gateway의 한국어 표시명을 기수 메타데이터로 저장하고 통일 archive가 내부 profile key 대신 해당 snapshot을 사용하도록 한다. seeder와 Hall/왕조 투영 회귀 테스트를 함께 추가한다.
This commit is contained in:
@@ -54,6 +54,7 @@ export interface ScenarioInstallOptions {
|
||||
season?: number;
|
||||
firstGameIdx?: number;
|
||||
serverId?: string;
|
||||
serverName?: string;
|
||||
installOperationId?: string;
|
||||
installCommitSha?: string;
|
||||
}
|
||||
@@ -315,6 +316,9 @@ export const seedScenarioToDatabase = async (options: ScenarioSeedOptions): Prom
|
||||
if (typeof install?.serverId === 'string' && install.serverId.trim()) {
|
||||
worldMeta.serverId = install.serverId.trim();
|
||||
}
|
||||
if (typeof install?.serverName === 'string' && install.serverName.trim()) {
|
||||
worldMeta.serverName = install.serverName.trim();
|
||||
}
|
||||
if (typeof install?.installOperationId === 'string' && install.installOperationId.trim()) {
|
||||
worldMeta.installOperationId = install.installOperationId.trim();
|
||||
}
|
||||
|
||||
@@ -367,6 +367,7 @@ describeDb('scenario database seed', () => {
|
||||
},
|
||||
preopenAt: new Date('2030-01-01T01:00:00Z'),
|
||||
openAt: new Date('2030-01-01T02:00:00Z'),
|
||||
serverName: '훼',
|
||||
},
|
||||
});
|
||||
|
||||
@@ -400,6 +401,7 @@ describeDb('scenario database seed', () => {
|
||||
(worldState.currentYear - (scenario.startYear ?? worldState.currentYear) + 10) * 2
|
||||
);
|
||||
expect(meta.killturn).toBe(1600);
|
||||
expect(meta.serverName).toBe('훼');
|
||||
const autorun = (meta.autorun_user ?? {}) as Record<string, unknown>;
|
||||
const autorunOptions = (autorun.options ?? {}) as Record<string, unknown>;
|
||||
expect(autorunOptions.develop).toBe(true);
|
||||
|
||||
@@ -260,7 +260,12 @@ describe('persistUnificationFinalization', () => {
|
||||
expect(hallCreate).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
data: expect.objectContaining({
|
||||
aux: expect.objectContaining({ ownerDisplayName: '표시 이름', fgColor: '#000000' }),
|
||||
aux: expect.objectContaining({
|
||||
ownerDisplayName: '표시 이름',
|
||||
fgColor: '#000000',
|
||||
serverName: '테스트',
|
||||
serverIdx: 2,
|
||||
}),
|
||||
}),
|
||||
})
|
||||
);
|
||||
@@ -279,7 +284,10 @@ describe('persistUnificationFinalization', () => {
|
||||
);
|
||||
expect(emperorCreate).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
data: expect.objectContaining({ aux: { winnerNationId: 1, generationKey: input.generationKey } }),
|
||||
data: expect.objectContaining({
|
||||
phase: '테스트2기',
|
||||
aux: { winnerNationId: 1, generationKey: input.generationKey },
|
||||
}),
|
||||
})
|
||||
);
|
||||
const archiveWrite = oldGeneralUpsert.mock.calls[0]?.[0] as {
|
||||
|
||||
Reference in New Issue
Block a user