CloudFormation: changing error message to match aws api (stack update attempt with no updates) (#5800)

This commit is contained in:
Ian Brown 2022-12-22 14:01:34 -05:00 committed by GitHub
parent a53f620846
commit 446930fcc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -367,7 +367,7 @@ class CloudFormationResponse(BaseResponse):
new_params = self._get_param_values(incoming_params, old_stack.parameters)
if old_stack.template == stack_body and old_stack.parameters == new_params:
raise ValidationError(
old_stack.name, message=f"Stack [{old_stack.name}] already exists"
old_stack.name, message="No updates are to be performed."
)
def _validate_status(self, stack: FakeStack) -> None:

View File

@ -1258,7 +1258,7 @@ def test_update_stack_fail_update_same_template_body():
exp_metadata = exp.value.response.get("ResponseMetadata")
exp_err.get("Code").should.equal("ValidationError")
exp_err.get("Message").should.equal(f"Stack [{name}] already exists")
exp_err.get("Message").should.equal("No updates are to be performed.")
exp_metadata.get("HTTPStatusCode").should.equal(400)
cf_conn.update_stack(