From: Maksym Iarmak Date: Wed, 14 Aug 2013 15:20:12 +0000 (+0300) Subject: Tests for s3 and swift resources were extended X-Git-Tag: 2014.1~201^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=bfddf669cc70958bbe2b4d1b5495151ac116e5e9;p=openstack-build%2Fheat-build.git Tests for s3 and swift resources were extended According to the description of the bug, the problem is in the mechanism of dependencies. That is an internal function Ref is not working properly. To repeat it, check was added to the test templates (s3_test, swift_test). Thus, the bug has not been reproduced. Also, the method FnGetRefId in s3 and swift resources, despite its name, returns the resource name in the format 'stack_name-resource_name-resource_id'. This is achieved by the method physical_resource_name, that implemented in superclass resource.Resource. Bug 1202987 Change-Id: I0f85c39e10e8b455f93fdd768cd5e6ee14497277 --- diff --git a/heat/tests/test_s3.py b/heat/tests/test_s3.py index 534de57d..f9abb241 100644 --- a/heat/tests/test_s3.py +++ b/heat/tests/test_s3.py @@ -44,6 +44,12 @@ swift_template = ''' } } }, + "SwiftContainer": { + "Type": "OS::Swift::Container", + "Properties": { + "S3Bucket": {"Ref" : "S3Bucket"}, + } + }, "S3Bucket" : { "Type" : "AWS::S3::Bucket", "Properties" : { diff --git a/heat/tests/test_swift.py b/heat/tests/test_swift.py index aa5ee4cf..7f38ef92 100644 --- a/heat/tests/test_swift.py +++ b/heat/tests/test_swift.py @@ -45,6 +45,12 @@ swift_template = ''' } } }, + "S3Bucket" : { + "Type" : "AWS::S3::Bucket", + "Properties" : { + "SwiftContainer" : {"Ref" : "SwiftContainer"} + } + }, "SwiftContainer" : { "Type" : "OS::Swift::Container", "Properties" : {