Skip to content

Commit 79054cf

Browse files
committed
test(dry-run): preserve cancel sample after rebase
1 parent 2919925 commit 79054cf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/lib/dry-run/samples.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,17 +595,22 @@ describe('findSample', () => {
595595
expect(body.summary.total).toBeGreaterThanOrEqual(1);
596596
});
597597

598-
it('keeps the failed run sentinel before the generic getRun sample', () => {
598+
it('keeps the failed run sentinel before generic getRun while retaining cancelRun', () => {
599599
// findSample is first-match-wins; exact run fixtures must precede
600600
// `/runs/{runId}` so `test wait --dry-run` still gets the passed sample.
601+
// The adjacent POST cancel fixture was added on main after this branch forked.
601602
const failedRunIndex = DRY_RUN_SAMPLE_ENTRIES.findIndex(
602603
e => e.method === 'GET' && e.pathTemplate === '/runs/run_failed_sample',
603604
);
604605
const genericRunIndex = DRY_RUN_SAMPLE_ENTRIES.findIndex(
605606
e => e.method === 'GET' && e.pathTemplate === '/runs/{runId}',
606607
);
608+
const cancelRunIndex = DRY_RUN_SAMPLE_ENTRIES.findIndex(
609+
e => e.method === 'POST' && e.pathTemplate === '/runs/{runId}/cancel',
610+
);
607611
expect(failedRunIndex).toBeGreaterThanOrEqual(0);
608612
expect(genericRunIndex).toBeGreaterThanOrEqual(0);
613+
expect(cancelRunIndex).toBeGreaterThanOrEqual(0);
609614
expect(failedRunIndex).toBeLessThan(genericRunIndex);
610615
});
611616

0 commit comments

Comments
 (0)