Add cancellation and cleanup for native server creation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user