Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-harvey-z3q committed Jun 2, 2024
1 parent fef0f4f commit 43fa364
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ def test_cancel_update_sends_correct_request(self, mock_wait_for_completion):

@patch("sceptre.plan.actions.StackActions.create")
@patch("sceptre.plan.actions.StackActions._get_status")
def test_launch_with_stack_that_does_not_exist(self, mock_get_status, mock_create):
def test_launch_with_stack_in_review_in_progress(
self, mock_get_status, mock_create
):
mock_get_status.side_effect = StackDoesNotExistError()
mock_create.return_value = sentinel.launch_response
response = self.actions.launch()
Expand All @@ -397,6 +399,19 @@ def test_launch_with_stack_that_failed_to_create(
mock_create.assert_called_once_with()
assert response == sentinel.launch_response

@patch("sceptre.plan.actions.StackActions.create")
@patch("sceptre.plan.actions.StackActions.delete")
@patch("sceptre.plan.actions.StackActions._get_status")
def test_launch_with_stack_that_does_not_exist(
self, mock_get_status, mock_delete, mock_create
):
mock_get_status.return_value = "REVIEW_IN_PROGRESS"
mock_create.return_value = sentinel.launch_response
response = self.actions.launch()
mock_delete.assert_called_once_with()
mock_create.assert_called_once_with()
assert response == sentinel.launch_response

@patch("sceptre.plan.actions.StackActions.update")
@patch("sceptre.plan.actions.StackActions._get_status")
def test_launch_with_complete_stack_with_updates_to_perform(
Expand Down

0 comments on commit 43fa364

Please sign in to comment.