Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-harvey-z3q committed Oct 27, 2024
1 parent df9975f commit b714aa0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
7 changes: 0 additions & 7 deletions sceptre/diffing/stack_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,6 @@ def _create_deployed_stack_config(
try:
description = stack_actions.describe()
except ClientError as err:
# Check for AWS access exceptions
if err.response["Error"]["Code"] == "ForbiddenException":
raise SceptreException(
"ForbiddenException: Confirm your current AWS profile is authenticated",
"and has the necessary access.",
)

# This means the stack has not been deployed yet
if err.response["Error"]["Message"].endswith("does not exist"):
return None
Expand Down
11 changes: 0 additions & 11 deletions tests/test_diffing/test_stack_differ.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,6 @@ def expected_deployed_config(self):
cloudformation_service_role=self.deployed_cloudformation_service_role,
)

def test__create_deployed_stack_config__wraps_aws_ForbiddenException(self):
def fail_with_ForbiddenException():
raise ClientError(
{"Error": {"Code": "ForbiddenException", "Message": "No access"}},
"describe",
)

self._describe_fn = fail_with_ForbiddenException
with pytest.raises(SceptreException):
self.differ._create_deployed_stack_config(self.actions)

def test_diff__compares_deployed_template_to_generated_template(self):
self.differ.diff(self.actions)

Expand Down

0 comments on commit b714aa0

Please sign in to comment.