Skip to content

Commit

Permalink
Add another test case for the coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Nov 28, 2024
1 parent 36b4d62 commit bf0bb5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/aws-cdk/test/api/deploy-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1127,9 +1127,13 @@ describe('disable rollback', () => {
});

test.each([
// From a failed state, a --no-rollback is possible as long as there is not a replacement
[StackStatus.UPDATE_FAILED, 'no-rollback', 'no-replacement', 'did-deploy-stack'],
[StackStatus.UPDATE_FAILED, 'no-rollback', 'replacement', 'failpaused-need-rollback-first'],
// Any combination of UPDATE_FAILED & rollback always requires a rollback first
[StackStatus.UPDATE_FAILED, 'rollback', 'replacement', 'failpaused-need-rollback-first'],
[StackStatus.UPDATE_FAILED, 'rollback', 'no-replacement', 'failpaused-need-rollback-first'],
// From a stable state, any deployment containing a replacement requires a regular deployment (--rollback)
[StackStatus.UPDATE_COMPLETE, 'no-rollback', 'replacement', 'replacement-requires-rollback'],
] satisfies Array<[StackStatus, 'rollback' | 'no-rollback', 'replacement' | 'no-replacement', string]>)
('no-rollback and replacement is disadvised: %s %s %s -> %s', async (stackStatus, rollback, replacement, expectedType) => {
Expand Down

0 comments on commit bf0bb5e

Please sign in to comment.