Simplify telemetry to three game events
This commit is contained in:
@@ -79,13 +79,12 @@ describe('T6 config lifecycle in a mixed fleet', () => {
|
||||
});
|
||||
|
||||
it('reads the T6 game log and keeps log path traversal checks', async () => {
|
||||
const { resolveLogPath, gameLogKey } = await import('../../src/lib/server/fleet/logs.js');
|
||||
const { scanMatchState } = await import('../../src/lib/server/fleet/match-log.js');
|
||||
const { resolveLogPath, gameLogKey, tailLog } = await import('../../src/lib/server/fleet/logs.js');
|
||||
const logs = join(fixture.t6, town, 'logs');
|
||||
await mkdir(logs, { recursive: true });
|
||||
await writeFile(join(logs, 'games_zm.log'), '0:00 InitGame:\n0:01 J;123;0;Player\n');
|
||||
expect(resolveLogPath(town, gameLogKey(town))).toBe(resolve(logs, 'games_zm.log'));
|
||||
expect(await scanMatchState(town)).toMatchObject({ kind: 'in-progress' });
|
||||
expect((await tailLog(resolveLogPath(town, gameLogKey(town))!, 10))?.lines).toContain('0:01 J;123;0;Player');
|
||||
expect(resolveLogPath('t6_/../../escape', 'games_zm')).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user