✅ Assert canceled runs fail their pending release with the cancellation reason
This commit is contained in:
parent
bf721b84a7
commit
3f6e0e2692
@ -399,9 +399,11 @@ describe('signed runner receipts and real rollback state machine', () => {
|
||||
const envelope = (await broker.poll(runner, environment.id))!;
|
||||
expect(envelope.payload.release.id).toBe(oldest.id);
|
||||
const status = async (id: string) => (await db.transaction('alpha', tx => tx.get<Release>('release', id)))!;
|
||||
// Canceled runs fail their pending release outright (see run-lifecycle's invalidation case),
|
||||
// so the stale release no longer waits on the queue with a "request a new release" reason.
|
||||
expect(await status(canceled.release.id)).toMatchObject({
|
||||
status: 'failed',
|
||||
failureReason: expect.stringContaining('request a new release'),
|
||||
failureReason: 'The run was canceled',
|
||||
});
|
||||
// Continuing the paused run may make its release current again.
|
||||
expect((await status(paused.release.id)).status).toBe('ready');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user