Log analysis job failures
This commit is contained in:
1 parent
f447e0c6ab
commit
9d43cc266c
4 files changed
+105
-2
No files matched your search
@@ -33,6 +33,29 @@ describe('AnalysisReadService', () => {
|
||||
expect(findOne).toHaveBeenCalledWith({ jobId: 'analysis-job-1' });
|
||||
});
|
||||
|
||||
it('preserves public Riot account not-found job errors', async () => {
|
||||
const findOne = jest.fn(() =>
|
||||
createLeanExec({
|
||||
error: 'Riot account was not found for the selected region.',
|
||||
jobId: 'analysis-job-1',
|
||||
progress: { fetchedMatches: 0, totalMatches: 0 },
|
||||
stage: 'resolve-account',
|
||||
status: 'failed',
|
||||
}),
|
||||
);
|
||||
const service = new AnalysisReadService({
|
||||
getModel: jest.fn().mockResolvedValue({ findOne }),
|
||||
} as unknown as ConnectionService);
|
||||
|
||||
await expect(service.getJobStatus('analysis-job-1')).resolves.toEqual({
|
||||
error: 'Riot account was not found for the selected region.',
|
||||
jobId: 'analysis-job-1',
|
||||
progress: { fetchedMatches: 0, totalMatches: 0 },
|
||||
stage: 'resolve-account',
|
||||
status: 'failed',
|
||||
});
|
||||
});
|
||||
|
||||
it('distinguishes analyzed accounts with no ranked games from missing accounts', async () => {
|
||||
const accountFindOne = jest.fn(() =>
|
||||
createLeanExec({
|
||||
|
||||
Reference in new issue
Block a user