Add cancellation and cleanup for native server creation

This commit is contained in:
2026-10-04 18:00:11 -04:00
parent 19f1f4e279
commit 176b7dd86b
17 changed files with 482 additions and 26 deletions
@@ -19,6 +19,17 @@ function fixture(): ProvisioningDetail {
}
describe('provisioning outcome and evidence presentation', () => {
it('distinguishes cancellation from confirmed cleanup and validates its link data', () => {
const detail = fixture();
detail.deployment.state = 'cancelled';
detail.canCancelCreation = false;
detail.cancellation = { cleanupId: 'cleanup-a', state: 'running', stage: 'Waiting for host', error: null };
expect(isProvisioningDetail(detail, detail.deployment.id)).toBe(true);
expect(provisioningOutcome(detail).description).toContain('ports remain reserved');
detail.cancellation.state = 'done';
expect(provisioningOutcome(detail).description).toContain('have been removed');
expect(isProvisioningDetail({ ...detail, cancellation: { state: 'done' } }, detail.deployment.id)).toBe(false);
});
it.each(provisioningActions)('describes cancelled %s as terminal, with no automatic execution claim', action => {
const detail = fixture();
detail.deployment.action = action;