Update stackset create operation to correctly return the resource's ID. (#3709)
* Update stackset create operation to correctly return the resource's ID. * Add test confirming create_stack_set response.
This commit is contained in:
parent
d07e287b37
commit
b6d7704b23
@ -438,7 +438,7 @@ class CloudFormationResponse(BaseResponse):
|
||||
return json.dumps(
|
||||
{
|
||||
"CreateStackSetResponse": {
|
||||
"CreateStackSetResult": {"StackSetId": stackset.stackset_id}
|
||||
"CreateStackSetResult": {"StackSetId": stackset.id}
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -926,7 +926,7 @@ LIST_EXPORTS_RESPONSE = """<ListExportsResponse xmlns="http://cloudformation.ama
|
||||
|
||||
CREATE_STACK_SET_RESPONSE_TEMPLATE = """<CreateStackSetResponse xmlns="http://internal.amazon.com/coral/com.amazonaws.maestro.service.v20160713/">
|
||||
<CreateStackSetResult>
|
||||
<StackSetId>{{ stackset.stackset_id }}</StackSetId>
|
||||
<StackSetId>{{ stackset.id }}</StackSetId>
|
||||
</CreateStackSetResult>
|
||||
<ResponseMetadata>
|
||||
<RequestId>f457258c-391d-41d1-861f-example</RequestId>
|
||||
|
@ -603,13 +603,14 @@ def test_boto3_delete_stack_set():
|
||||
@mock_cloudformation
|
||||
def test_boto3_create_stack_set():
|
||||
cf_conn = boto3.client("cloudformation", region_name="us-east-1")
|
||||
cf_conn.create_stack_set(
|
||||
response = cf_conn.create_stack_set(
|
||||
StackSetName="test_stack_set", TemplateBody=dummy_template_json
|
||||
)
|
||||
|
||||
cf_conn.describe_stack_set(StackSetName="test_stack_set")["StackSet"][
|
||||
"TemplateBody"
|
||||
].should.equal(dummy_template_json)
|
||||
response["StackSetId"].should_not.be.empty
|
||||
|
||||
|
||||
@mock_cloudformation
|
||||
|
Loading…
Reference in New Issue
Block a user