test(platform-service): update fleet artifact tests for productId-scoped listing
listArtifactsByJob now requires productId; thread it through the existing repository/artifacts test callers (signature update, assertions unchanged).
This commit is contained in:
parent
e06b730161
commit
32328247ad
@ -124,8 +124,8 @@ describe('fleet artifacts — blob service', () => {
|
||||
contentType: 'image/png',
|
||||
});
|
||||
|
||||
const a = await repo.listArtifactsByJob('jA');
|
||||
const b = await repo.listArtifactsByJob('jB');
|
||||
const a = await repo.listArtifactsByJob('jA', PID);
|
||||
const b = await repo.listArtifactsByJob('jB', PID);
|
||||
expect(a).toHaveLength(2);
|
||||
expect(a.every(x => x.jobId === 'jA')).toBe(true);
|
||||
expect(b).toHaveLength(1);
|
||||
|
||||
@ -182,7 +182,7 @@ describe('fleet repository', () => {
|
||||
sizeBytes: 42,
|
||||
createdAt: now,
|
||||
});
|
||||
const arts = await repo.listArtifactsByJob('j');
|
||||
const arts = await repo.listArtifactsByJob('j', PID);
|
||||
expect(arts).toHaveLength(1);
|
||||
expect(arts[0].blobKey).toBe('fleet/lysnrai/j/art_1-coverage');
|
||||
|
||||
@ -193,7 +193,7 @@ describe('fleet repository', () => {
|
||||
// delete returns the removed doc and clears the partition
|
||||
const removed = await repo.deleteArtifact('art_1', PID);
|
||||
expect(removed?.id).toBe('art_1');
|
||||
expect(await repo.listArtifactsByJob('j')).toHaveLength(0);
|
||||
expect(await repo.listArtifactsByJob('j', PID)).toHaveLength(0);
|
||||
expect(await repo.deleteArtifact('art_1', PID)).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user